feat: add typescript-urql-sdk plugin
Description
This PR adds the new plugin typescript-urql-sdk. It's like generic-sdk or apollo-graphql but with urql.
Related dotansimha/graphql-code-generator-community#186
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
Usage example
import { Client } from '@urql/core'
const client = new Client({ url: '/graphql' })
const sdk = getSdk(client)
await sdk.hello().toPromise()
How Has This Been Tested?
See included test code.
Checklist:
- [x] I have followed the CONTRIBUTING doc and the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream modules
⚠️ No Changeset found
Latest commit: f06d7499d4a834fc016c6873670c4f9526cf2d12
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| graphql-code-generator | ✅ Ready (Inspect) | Visit Preview | Apr 24, 2022 at 2:24PM (UTC) |
Thanks for the PR!
But isn't that something can be done with generic-sdk easily with a few lines of code?
Hi!
All community plugins (see list below) have been moved to a new dotansimha/graphql-code-generator-community.
Community plugins:
-
@graphql-codegen/typescript-react-apollo -
@graphql-codegen/typescript-graphql-request -
@graphql-codegen/typescript-apollo-angular -
@graphql-codegen/typescript-apollo-client-helpers -
@graphql-codegen/typescript-react-query -
@graphql-codegen/typescript-urql -
@graphql-codegen/named-operations-object -
@graphql-codegen/urql-introspection -
@graphql-codegen/flow-resolvers -
@graphql-codegen/typescript-vue-apollo -
@graphql-codegen/typescript-rtk-query -
@graphql-codegen/flow-operations -
@graphql-codegen/typescript-msw -
@graphql-codegen/typescript-mongodb -
@graphql-codegen/typescript-type-graphql -
@graphql-codegen/jsdoc -
@graphql-codegen/typescript-vue-urql -
@graphql-codegen/kotlin -
@graphql-codegen/typescript-vue-apollo-smart-ops -
@graphql-codegen/java -
@graphql-codegen/c-sharp-operations -
@graphql-codegen/hasura-allow-list -
@graphql-codegen/typescript-stencil-apollo -
@graphql-codegen/relay-operation-optimizer -
@graphql-codegen/typescript-oclif -
@graphql-codegen/java-resolvers -
@graphql-codegen/java-apollo-android -
@graphql-codegen/flutter-freezed
Please move your PR by following these steps:
From your current PR branch:
- Fork the https://github.com/dotansimha/graphql-code-generator-community repository
- git remote add codegen-community <GIT_URL_OF_YOUR_COMMUNITY_REPO_FORK>
- git fetch codegen-community
- git push codegen-community
Open the PR on dotansimha/graphql-code-generator-community and close this PR.
Thank you!