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: handle undefined namedType for introspection #8390

Merged
merged 2 commits into from Oct 24, 2022

Conversation

Diizzayy
Copy link
Contributor

Description

This PR handles instances where the namedType is undefined and prevents it from being passed to the isIntrospectionType function which would result in a crash as outlined in #8389

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • 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

How Has This Been Tested?

I've ran and ensured that the existing tests pass

Test Environment:

  • Operating System: Linux
  • Node Version: v14.19.1
  • Package Manager: yarn@1.22.19

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 Sep 27, 2022

🦋 Changeset detected

Latest commit: 8f6fc13

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/typescript Major
@graphql-codegen/typescript-mongodb Patch
@graphql-codegen/typescript-operations Patch
@graphql-codegen/typescript-resolvers Patch
@graphql-codegen/typescript-type-graphql Patch
@graphql-codegen/client-preset Patch
@graphql-codegen/gql-tag-operations-preset Patch
@graphql-codegen/cli Patch
@graphql-cli/codegen 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

@charlypoly
Copy link
Contributor

This PR handles instances where the namedType is undefined and prevents it from being passed to the isIntrospectionType function which would result in a crash as outlined in #8389

Hi @Diizzayy,

Could you provide an example of reproduction for this bug?

@Diizzayy
Copy link
Contributor Author

Could you provide an example of reproduction for this bug?

@charlypoly Thank you for getting back to me on this, the linked issue #8389 provides a reproduction at that demonstrates this bug https://github.com/Diizzayy/cgenbug

@charlypoly charlypoly merged commit 12ecbe0 into dotansimha:master Oct 24, 2022
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