deterministic SourceLocation serialization by jbellenger · Pull Request #3987 · graphql-java/graphql-java

In upgrading from 22.3 to 24.0, some of our tests that make assertions on serialized responses started failing.

I think this was probably caused by #3753, which changed the serialized representation from a LinkedHashMap to a Map.of, which has randomized iteration order. This PR brings back the LinkedHashMap serialization format.

I'd appreciate some feedback on this! While the spec doesn't describe how the fields of an error should be ordered, non-deterministic ordering can make it difficult to build reliable tests that interact with GraphQL errors.