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 stitchSchemas for when empty array of typeDefs are passed #1575

Merged
merged 1 commit into from Jun 2, 2020

Conversation

rufman
Copy link
Contributor

@rufman rufman commented Jun 1, 2020

If an empty array is passed, the GraphQL parser fails, because the
source is empty. Switch the typeDef check to check for length as well,
since an empty array is truthy.

TODO:

  • If this PR is a new feature, reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass
  • Update CHANGELOG.md with your change. Include a description of your change, link to PR (always) and issue (if applicable). Add your CHANGELOG entry under vNEXT. Do not create a new version number for your change yourself.

If an empty array is passed, the GraphQL parser fails, because the
source is empty. Switch the typeDef check to check for length as well,
since an empty array is truthy.
@ardatan
Copy link
Owner

ardatan commented Jun 2, 2020

Thank you @rufman ! That was an issue on GraphQL Mesh.
ardatan/graphql-mesh#515

@ardatan ardatan merged commit e08738d into ardatan:master Jun 2, 2020
@theguild-bot
Copy link
Collaborator

The latest changes of this PR are available as alpha in npm: 6.0.6-alpha-e08738d.0

Quickly update your package.json by running:

npx match-version @graphql-tools 6.0.6-alpha-e08738d.0

@ardatan
Copy link
Owner

ardatan commented Jun 2, 2020

Available in v6.0.6 !

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

3 participants