This added a collection of all SwiftTypes and their aliased GraphQL names to TypeProvider. These names are collected before any GraphQL types are created, and are used when resolving TypeReferences, so out-of-order references to aliased types are no longer mis-addressed.
To do so, we had to add a setGraphQLName function to the Component class, and implementations for all GraphQL Type components (Enum, Input, Interface, Scalar, Schema, Type, and Union). Schema construction now goes through all components to collect names prior to building up the GraphQL schema objects.
This fixes https://github.com/GraphQLSwift/Graphiti/issues/41
This added a collection of all SwiftTypes and their aliased GraphQL names to TypeProvider. These names are collected before any GraphQL types are created, and are used when resolving TypeReferences, so out-of-order references to aliased types are no longer mis-addressed.
To do so, we had to add a
setGraphQLName
function to the Component class, and implementations for all GraphQL Type components (Enum, Input, Interface, Scalar, Schema, Type, and Union). Schema construction now goes through all components to collect names prior to building up the GraphQL schema objects.