Implements the algorithm for validating "Field Selection Merging" as described in: https://tech.xing.com/graphql-overlapping-fields-can-be-merged-fast-ea6e92e0a01
A hashable representation of field name and arguments, used to check uniqueness of them in a set of fields
A hashable representation of field name and arguments, used to check uniqueness of them in a set of fields
Two fields also have the same name and arguments when the order of arguments differs.
For the validation we need another representation of the query that already contains the effective selection sets for each field and certain properties of the fields.
For the validation we need another representation of the query that already contains the effective selection sets for each field and certain properties of the fields. As we don't want to adapt the sangria representation, we build our own here during traversal of the query.
A set representation that is well suited to hash and equality comparisons and fast iteration over members
A representation of the output shape of a field
A representation of the output shape of a field
Used to check uniqueness of the output shape in an overlapping set of fields
Implements the algorithm for validating "Field Selection Merging" as described in: https://tech.xing.com/graphql-overlapping-fields-can-be-merged-fast-ea6e92e0a01
Should have the same effect as the algorithm in the GraphQL Specification: https://graphql.github.io/graphql-spec/draft/#sec-Field-Selection-Merging