public void Resolve(GraphQLDocument doc) { this.rootType = doc.ResolveType(this.definition.TypeCondition) as IGraphQLFieldCollection; this.Selection.Resolve(doc, this.rootType); this.Path = doc.ResolveQuerySource(this.definition.Location); this.Query = doc.ResolveFragment(this.definition); }
private IEnumerable <InterfaceType> ResolveInterfaces(GraphQLDocument doc) { foreach (var interfaceDefinitionLookup in this.definition.Interfaces) { var actualinterface = doc.ResolveType(interfaceDefinitionLookup); yield return(actualinterface as InterfaceType); } }
public void Resolve(GraphQLDocument doc) { Paramaters = operation.VariableDefinitions?.ToDictionary(x => x.Variable.Name.Value, x => doc.ResolveValueType(x.Type)) ?? new Dictionary <string, ValueTypeReference>(); var rootType = doc.ResolveType(operation.Operation) as IGraphQLFieldCollection; (this.Query, this.Path) = doc.ResolveQuery(operation.Location); Selection.Resolve(doc, rootType); }
internal static Field TypeName(GraphQLDocument doc) { Field field = new Field("__typename"); field.Type = new ValueTypeReference { Type = doc.ResolveType("String"), CanCollectionBeNull = false, CanValueBeNull = false, IsCollection = false }; return(field); }
public void Resolve(GraphQLDocument doc) { this.Types = this.op.Types.Select(x => doc.ResolveType(x)).ToList(); }