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

Fix resolveReference being generated as required when using generateInternalResolversIfNeeded.__resolveReference #10230

Merged
merged 3 commits into from
Jan 18, 2025

Conversation

eddeee888
Copy link
Collaborator

@eddeee888 eddeee888 commented Jan 5, 2025

Description

First implementation is #9989

__resolveReference's default behaviour when not declared is to pass the ref to subsequent resolvers i.e. becoming the parent. So, it means we don't have to make this resolver required.

This patch makes __resolveReference optional when generateInternalResolversIfNeeded.__resolveReference is set to true.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

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

  • Unit test

Copy link

changeset-bot bot commented Jan 5, 2025

🦋 Changeset detected

Latest commit: d7a711a

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 Patch
@graphql-codegen/typescript-resolvers Patch
@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 Jan 5, 2025

🚀 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.6.1-alpha-20250118075542-d7a711aa2c16cb9f3202c407191d18b543dc8569 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-document-nodes 4.0.13-alpha-20250118075542-d7a711aa2c16cb9f3202c407191d18b543dc8569 npm ↗︎ unpkg ↗︎
@graphql-codegen/gql-tag-operations 4.0.13-alpha-20250118075542-d7a711aa2c16cb9f3202c407191d18b543dc8569 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-operations 4.4.1-alpha-20250118075542-d7a711aa2c16cb9f3202c407191d18b543dc8569 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-resolvers 4.4.2-alpha-20250118075542-d7a711aa2c16cb9f3202c407191d18b543dc8569 npm ↗︎ unpkg ↗︎
@graphql-codegen/typed-document-node 5.0.13-alpha-20250118075542-d7a711aa2c16cb9f3202c407191d18b543dc8569 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript 4.1.3-alpha-20250118075542-d7a711aa2c16cb9f3202c407191d18b543dc8569 npm ↗︎ unpkg ↗︎
@graphql-codegen/client-preset 4.6.0-alpha-20250118075542-d7a711aa2c16cb9f3202c407191d18b543dc8569 npm ↗︎ unpkg ↗︎
@graphql-codegen/graphql-modules-preset 4.0.13-alpha-20250118075542-d7a711aa2c16cb9f3202c407191d18b543dc8569 npm ↗︎ unpkg ↗︎

Copy link
Contributor

github-actions bot commented Jan 5, 2025

💻 Website Preview

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

@eddeee888 eddeee888 changed the title Fix resolveReference being generated as required Fix resolveReference being generated as required when using generateInternalResolversIfNeeded.__resolveReference Jan 7, 2025
@eddeee888 eddeee888 merged commit 60dd72f into master Jan 18, 2025
19 checks passed
@eddeee888 eddeee888 deleted the fix-generate-resolvereference-as-required branch January 18, 2025 08:08
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.

1 participant