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

useFragment throws an error when a fragment has the @include directive #11924

Closed
dragozin opened this issue Jul 4, 2024 · 4 comments · Fixed by #11926
Closed

useFragment throws an error when a fragment has the @include directive #11924

dragozin opened this issue Jul 4, 2024 · 4 comments · Fixed by #11926
Labels

Comments

@dragozin
Copy link
Contributor

dragozin commented Jul 4, 2024

Issue Description

If I use a fragment with the @include directive useFragment react hook throws an error Invalid variable referenced in @include directive.

Link to Reproduction

https://codesandbox.io/p/sandbox/apollo-client-bug-5xym9k

Reproduction Steps

No response

@apollo/client version

3.10.8

@phryneas
Copy link
Member

phryneas commented Jul 4, 2024

Thank you for the report - I've opened a PR with (hopefully) a fix.
Could you please give this build a try and report back if it solves your problem?

npm i @apollo/client@0.0.0-pr-11926-20240704151615

@dragozin
Copy link
Contributor Author

dragozin commented Jul 5, 2024

Could you please give this build a try and report back if it solves your problem?

Hello! Thank you for the quick fix! Yes, it helps!

Copy link
Contributor

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.

Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants