graphql-tools
graphql-tools copied to clipboard
globalGqlIdentifierName is inconsistently forced lowercase so doesn't work with mixed case identifiers
Issue workflow progress
Progress of the issue based on the Contributor Workflow
- [ ] 1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox
Make sure to fork this template and run
yarn generatein the terminal.Please make sure the GraphQL Tools package versions under
package.jsonmatches yours. - [x] 2. A failing test has been provided
- [x] 3. A local solution has been provided
- [x] 4. A pull request is pending review
Describe the bug
globalGqlIdentifierName are set to be lower case in tag-pluck but when the visitor uses them it does a case sensitive compare
To Reproduce Steps to reproduce the behavior:
pluckConfig: {
globalGqlIdentifierName: ['helloGql']
}
const query = helloGql(`
[snip]
`);
Expected behavior
Case sensitive identifiers can match. Either globalGqlIdentifierName shouldn't be converted to lower case or identifiers in the code should be. Changing the comparison to be case insensitive should not break backward compatibility whereas changing it to be case sensitive may.
Environment:
- OS: MacOs
@graphql-tools/...: 8.3- NodeJS: 18
Additional context
https://github.com/ardatan/graphql-tools/pull/5945