Description
Today I've noticed apollo-client
displaying warnings in console about queried fields missing from server's response:
At first I've thought that there's something wrong with Apollo client mistaking between fragments, but I've investigated server's response for query and GraphQL Playground, and realized that randomly, my query reuses result of one fragment where other fragment is expected:
This result occurs at random. Sometimes I always get valid query result. Sometimes I keep running into invalid query result.
Here's recording of this happening on Vimeo:
I'm suspecting race condition within the Query executor, as it seems that moving category fields to bottom of thread
seems to solve the issue, perhaps giving few more laps in the event loop for past subset to clean and new subset to be used?
I haven't seen this error occur for first fragment used within query, only for the latter one.