You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec says that response maps should have keys in the same order that the query requested fields (https://spec.graphql.org/draft/#sec-Serialized-Map-Ordering), but GraphQL-Ruby doesn't do that. Instead, it creates a Hash to store the result and writes keys as soon as they're available. Consequently, results from GraphQL-Ruby violate the spec: instead of coming back in the order requested by the client, they come back in a library-determined order.
The simplest implementation would be to make a new, properly ordered Hash, something like:
The spec says that response maps should have keys in the same order that the query requested fields (https://spec.graphql.org/draft/#sec-Serialized-Map-Ordering), but GraphQL-Ruby doesn't do that. Instead, it creates a Hash to store the result and writes keys as soon as they're available. Consequently, results from GraphQL-Ruby violate the spec: instead of coming back in the order requested by the client, they come back in a library-determined order.
The simplest implementation would be to make a new, properly ordered Hash, something like:
But I'll have to check the memory and runtime impact of adding that.
Fixes #4252
The text was updated successfully, but these errors were encountered: