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

graphql-tag-pluck can't be configured to ignore gql... #5173

Open
4 tasks
Tracked by #5201 ...
Wojonatior opened this issue Apr 14, 2023 · 1 comment
Open
4 tasks
Tracked by #5201 ...

graphql-tag-pluck can't be configured to ignore gql... #5173

Wojonatior opened this issue Apr 14, 2023 · 1 comment

Comments

@Wojonatior
Copy link

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 generate in the terminal.

    Please make sure the GraphQL Tools package versions under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

I have tried a number of configurations, but I have not been able to get graphql-tag-pluck to ignore the default gql tag.
I have further noticed that even custom tags that include gql are still picked up when the globalGqlIdentifierName property is configured. For example I had a custom tag gql_ecommerce and that tag was still picked up.

To Reproduce
Steps to reproduce the behavior:

Configure globalGqlIdentifierName to an empty list of tags.
Run the graphql-code-generator.
gql tags are still picked up and processed by the codegen.

Expected behavior

Tags that are not listed in the globalGqlIdentifierName to not be picked up by graphql-tag-pluck

Environment:

  • OS: MacOS 12.3
  • "@graphql-tools/graphql-tag-pluck": "7.5.0",
  • NodeJS: 19.7.0

Additional context
I understand the use case I have may be strange, I can elaborate on why it's needed if desired, but the inability to unset tags has been a point of frustration with using the codegen.

@ardatan
Copy link
Owner

ardatan commented Apr 14, 2023

Could you create a failing test in a PR? Thanks!

tian-sheng-low added a commit to tian-sheng-low/graphql-tools that referenced this issue Jun 22, 2023
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

No branches or pull requests

2 participants