We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
mergeTypeDefs
repeatable
Describe the bug
mergeTypeDefs ignores repeatable...sometimes
To Reproduce Steps to reproduce the behavior:
StackBlitz: https://stackblitz.com/edit/stackblitz-starters-ydtdvx?file=index.mjs
import { mergeTypeDefs } from '@graphql-tools/merge'; const td0 = `directive @foo(person: String) repeatable on OBJECT`; const td1 = ` type Foo @foo(person: "alice") @foo(person: "bob"){ hello: String } `; const td2 = ` extend type Foo { goodbye: String } `; console.log( 'directive count:', mergeTypeDefs([td1]).definitions.find( (d) => d.kind === 'ObjectTypeDefinition' && d.name.value === 'Foo' ).directives.length ); // directive count: 2 ✅ console.log( 'directive count:', mergeTypeDefs([td0, td1, td2]).definitions.find( (d) => d.kind === 'ObjectTypeDefinition' && d.name.value === 'Foo' ).directives.length ); // directive count: 2 ✅ console.log( 'directive count:', mergeTypeDefs([td1, td2]).definitions.find( (d) => d.kind === 'ObjectTypeDefinition' && d.name.value === 'Foo' ).directives.length ); // directive count: 1 ❌
Expected behavior
Should be directive count: 2 in all test cases.
directive count: 2
Environment:
"@graphql-tools/merge": "9.0.7"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
mergeTypeDefs
ignores repeatable...sometimesTo Reproduce Steps to reproduce the behavior:
StackBlitz: https://stackblitz.com/edit/stackblitz-starters-ydtdvx?file=index.mjs
Expected behavior
Should be
directive count: 2
in all test cases.Environment:
"@graphql-tools/merge": "9.0.7"
The text was updated successfully, but these errors were encountered: