Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generated resolversMap to typescript-resolvers plugin meta #10007

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

eddeee888
Copy link
Collaborator

Description

This PR extends typescript-resolvers plugin's meta to have the generated resolver map type. This is useful for Server Preset as it needs to refer to this type when generating resolvers.generated.ts

This changes the meta shape slightly to have user defined types in the schema under generatedResolvers.userDefined instead of generatedResolvers. New shape:

meta: {
  generatedResolverTypes: {
      resolversMap: { name: string };
      userDefined: Record<string, { name: string }>;
    }
}

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Updated unit test

Copy link

changeset-bot bot commented Jun 16, 2024

🦋 Changeset detected

Latest commit: 4555bc4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@graphql-codegen/visitor-plugin-common Minor
@graphql-codegen/typescript-resolvers Minor
@graphql-codegen/typescript-document-nodes Patch
@graphql-codegen/gql-tag-operations Patch
@graphql-codegen/typescript-operations Patch
@graphql-codegen/typed-document-node Patch
@graphql-codegen/typescript Patch
@graphql-codegen/graphql-modules-preset Patch
@graphql-codegen/client-preset Patch

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

Copy link
Contributor

github-actions bot commented Jun 16, 2024

💻 Website Preview

The latest changes are available as preview in: https://5712341e.graphql-code-generator.pages.dev

Copy link
Contributor

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-codegen/visitor-plugin-common 5.3.0-alpha-20240616104522-4555bc46e3e4ee1c6e0744437585b0e50da232b8 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-document-nodes 4.0.8-alpha-20240616104522-4555bc46e3e4ee1c6e0744437585b0e50da232b8 npm ↗︎ unpkg ↗︎
@graphql-codegen/gql-tag-operations 4.0.8-alpha-20240616104522-4555bc46e3e4ee1c6e0744437585b0e50da232b8 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-operations 4.2.2-alpha-20240616104522-4555bc46e3e4ee1c6e0744437585b0e50da232b8 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-resolvers 4.2.0-alpha-20240616104522-4555bc46e3e4ee1c6e0744437585b0e50da232b8 npm ↗︎ unpkg ↗︎
@graphql-codegen/typed-document-node 5.0.8-alpha-20240616104522-4555bc46e3e4ee1c6e0744437585b0e50da232b8 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript 4.0.8-alpha-20240616104522-4555bc46e3e4ee1c6e0744437585b0e50da232b8 npm ↗︎ unpkg ↗︎
@graphql-codegen/client-preset 4.3.1-alpha-20240616104522-4555bc46e3e4ee1c6e0744437585b0e50da232b8 npm ↗︎ unpkg ↗︎
@graphql-codegen/graphql-modules-preset 4.0.8-alpha-20240616104522-4555bc46e3e4ee1c6e0744437585b0e50da232b8 npm ↗︎ unpkg ↗︎

@eddeee888 eddeee888 merged commit 808ada5 into master Jun 17, 2024
19 checks passed
@eddeee888 eddeee888 deleted the add-codegen-types-to-meta branch June 17, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants