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

[typescript-resolvers] Fix resolversNonOptionalTypename for union members in mapper cases #9231

Merged
merged 5 commits into from Apr 4, 2023

Conversation

eddeee888
Copy link
Collaborator

@eddeee888 eddeee888 commented Mar 27, 2023

Description

This PR fixes resolversNonOptionalTypename union member when used in mapper cases:

  • mappers without placeholders
  • mappers with placeholders
  • default mappers without placeholders
  • default mappers with placeholders

This also adds unit tests for these scenarios.

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

  • Unit tests

Checklist:

  • I have followed the CONTRIBUTING doc and the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@changeset-bot
Copy link

changeset-bot bot commented Mar 27, 2023

🦋 Changeset detected

Latest commit: 6e6076d

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

@eddeee888 eddeee888 changed the title [typescript-resolvers] Fix resolversNonOptionalTypename cases for union members in mapper and placeholder cases [typescript-resolvers] Fix resolversNonOptionalTypename cases for union members in mapper cases Mar 27, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 27, 2023

🚀 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/cli 3.3.0-alpha-20230403114914-6e6076d6c npm ↗︎ unpkg ↗︎
@graphql-codegen/visitor-plugin-common 3.1.0-alpha-20230403114914-6e6076d6c npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-document-nodes 3.0.3-alpha-20230403114914-6e6076d6c npm ↗︎ unpkg ↗︎
@graphql-codegen/gql-tag-operations 3.0.0-alpha-20230403114914-6e6076d6c npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-operations 3.0.3-alpha-20230403114914-6e6076d6c npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-resolvers 3.2.0-alpha-20230403114914-6e6076d6c npm ↗︎ unpkg ↗︎
@graphql-codegen/typed-document-node 4.0.0-alpha-20230403114914-6e6076d6c npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript 3.0.3-alpha-20230403114914-6e6076d6c npm ↗︎ unpkg ↗︎
@graphql-codegen/client-preset 3.0.0-alpha-20230403114914-6e6076d6c npm ↗︎ unpkg ↗︎
@graphql-codegen/graphql-modules-preset 3.1.2-alpha-20230403114914-6e6076d6c npm ↗︎ unpkg ↗︎
@graphql-codegen/testing 2.0.2-alpha-20230403114914-6e6076d6c npm ↗︎ unpkg ↗︎
@graphql-codegen/plugin-helpers 4.2.0-alpha-20230403114914-6e6076d6c npm ↗︎ unpkg ↗︎

@eddeee888 eddeee888 changed the title [typescript-resolvers] Fix resolversNonOptionalTypename cases for union members in mapper cases [typescript-resolvers] Fix resolversNonOptionalTypename for union members in mapper cases Mar 27, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 27, 2023

💻 Website Preview

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

@saihaj saihaj merged commit 402cb8a into master Apr 4, 2023
20 checks passed
@saihaj saihaj deleted the fix-resolversnonoptionaltypename-cases branch April 4, 2023 13:53
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.

None yet

2 participants