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

Unable to define fragments in loader #589

Open
laverdet opened this issue Mar 28, 2022 · 0 comments
Open

Unable to define fragments in loader #589

laverdet opened this issue Mar 28, 2022 · 0 comments

Comments

@laverdet
Copy link

When using graphql-tag/loader under Webpack, the returned results are surprising when working directly with fragments in processed files.

I put together a full reproduction here:
https://github.com/laverdet/graphql-issue

If you clone the repository and run npm install; npm start you will see the following output:

query Hello {
  ...Fragment
}

query Query {
  id
}

fragment Fragment on Model {
  id
}

It is unexpected that query Query would end up in the output considering it is not referenced at all.

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

1 participant