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
normalizer fails for simple lists that are not ordered #4677
Comments
Thanks for the report. We currently expect all GraphQL results to be stable within a single request. GraphQL Spec presumably allows this degree of instability, so I see where you're coming from. This warning is generally quite useful. Do you have a suggestion on ways we could enable your use case without sacrificing the warning for the more common case where results are stable? |
Thanks for your fast answer. For once, I guess it would be beneficial if this requirement would be stated in the docs. It also would be very helpful if the warning would be a bit more verbose, or in the best case would link to a place in the docs. Regarding the stable response: I am not 100% familiar with Relay internals, so the following statements might be wrong. If you resolve the same field twice in a query, normalize the first occurrence. If the second occurrence has the same nodes, based on a set derived from the list, don't overwrite the list record during normalization. Continue with the normalization of the items in the list. |
Hello,
with the current
main
version, we observe an (it seems) undocumented behavior when using simple lists that are not ordered.This happens when the same node with a list field has different orders of elements in these lists. We have some lists that are small and where pagination doesn't make sense; thus they are not a connection.
Simple example:
This would result in
Simple test case based on existing types in the test package.
The text was updated successfully, but these errors were encountered: