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

Handle unmatched fragment types in diffRelayQuery #632

Closed

Conversation

josephsavona
Copy link
Contributor

RelayQueryWriter no longer writes the results of unmatched fragments. However, diffRelayQuery still attempts to diff fragments that don't match the known type. The logic is:

  • when diffing, we shouldn't look at fragments whose types don't match
  • but we can't remove those fragments, because if we end up refetching the node, it might be a different record whose type could match that fragment
  • so we should treat non-matching fragments as requisite fields and only keep them if the node would otherwise be refetched

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants