Add solid-urql and solidstart-urql generators#1350
Open
davedbase wants to merge 7 commits intodotansimha:mainfrom
Open
Add solid-urql and solidstart-urql generators#1350davedbase wants to merge 7 commits intodotansimha:mainfrom
davedbase wants to merge 7 commits intodotansimha:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 3aead04 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Author
|
Note that I had a couple issues following the contributor guide. Some notes for consideration:
Could someone provide additional guidance on how to submit to Plugins Hub and the documentation website? |
Author
|
@dotansimha would love feedback on this PR if you have a moment :) |
Author
|
@dotansimha sorry to gently nudge but if you have a moment we'd appreciate a review and release so we can make use of it in our projects :) Thanks so much for you OSS efforts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds two new GraphQL Code Generator plugins for the SolidJS ecosystem:
@graphql-codegen/typescript-solid-urql- Generates typed SolidJS URQL hooks (createQuery, createMutation, createSubscription) for GraphQL operations@graphql-codegen/typescript-solidstart-urql- Generates typed SolidStart URQL query primitives and mutation actions for server-side rendering with SolidStartThese plugins follow the same patterns as the existing React and Vue URQL plugins, but are tailored for SolidJS's reactive primitives. They enable developers using SolidJS/SolidStart with URQL to get full TypeScript type safety for their GraphQL operations.
Type of change
Screenshots/Sandbox (if appropriate/relevant):
Example generated code for a query:
solid-urql:
solidstart-urql:
How Has This Been Tested?
Comprehensive test suites have been added for both plugins:
Test Results:
Test Environment:
@graphql-codegen/*: Latest from monorepoChecklist:
Further comments
Implementation Details:
Both plugins extend
ClientSideBaseVisitorfrom@graphql-codegen/visitor-plugin-common, following the same architecture as other URQL plugins in the monorepo.Key differences from React/Vue URQL plugins:
createQuery,createMutation,createSubscription) instead of React hooksConfiguration Options:
Both plugins support:
withPrimitives(default: true) - Enable/disable hook/primitive generationurqlImportFrom- Customize the URQL package import sourceDocumentation:
All configuration options are documented with JSDoc including
@name,@description,@default, and@exampleMarkdowntags for automatic documentation generation. The plugins are ready to be added to the documentation site's plugin registry.