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(merge): add default value for mergeDirectives #1671

Merged
merged 1 commit into from Jun 23, 2020

Conversation

rufman
Copy link
Contributor

@rufman rufman commented Jun 23, 2020

The GraphQL reference implementation treats directives as optional,
so mergeDirectives needs to handle the undefined case, since some
libraries will set directives to be undefined instead of an empty list.

see https://github.com/graphql/graphql-js/blob/20a8f555e7eaa5c2fa2fd188abcef83ee8169e7f/src/language/ast.d.ts#L453

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

The GraphQL reference implementation treats directives  as optional,
so mergeDirectives needs to handle the `undefined` case, since some
libraries will set `directives` to be undefined instead of an empty list.

see https://github.com/graphql/graphql-js/blob/20a8f555e7eaa5c2fa2fd188abcef83ee8169e7f/src/language/ast.d.ts#L453
@ardatan
Copy link
Owner

ardatan commented Jun 23, 2020

@rufman Thank you very much!!!

@ardatan ardatan added the bugfix label Jun 23, 2020
@ardatan ardatan merged commit 6bb170f into ardatan:master Jun 23, 2020
@theguild-bot
Copy link
Collaborator

The latest changes of this PR are available as alpha in npm: 6.0.11-alpha-6bb170f.0

Quickly update your package.json by running:

npx match-version @graphql-tools 6.0.11-alpha-6bb170f.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants