-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Infinite loop when using directives #2243
Labels
Comments
@santaclauze Sorry for the delay, I was traveling to/from GraphQL Summit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First of all thanks for the great project. I use graphql a lot and am trying to look in the deeper functionalities.
I have a large entity that I query in multiple places in my app. I realized I could query only parts of it by using directives.
In one of my components, I have to query within a
useEffect
and thus opted for the lazy query.I then added directives as follows:
When loggin on my app, I get an infinite loop that keep triggering the lazyQuery even though the directive arguments seem to be set.
HOWEVER, As soon as I add the arguments as follows, it fixes the infinite loop.
Is there something in the behaviour of Graphql that I am missing? is this an expected behaviour?
It seems quite odd to me that passing the variables in the query even though they were visible in teh query before and being set with a default value would give any different result.
The text was updated successfully, but these errors were encountered: