コード例 #1
0
 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);
 }
コード例 #2
0
ファイル: ObjectType.cs プロジェクト: tocsoft/GraphQLCodeGen
 private IEnumerable <InterfaceType> ResolveInterfaces(GraphQLDocument doc)
 {
     foreach (var interfaceDefinitionLookup in this.definition.Interfaces)
     {
         var actualinterface = doc.ResolveType(interfaceDefinitionLookup);
         yield return(actualinterface as InterfaceType);
     }
 }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
ファイル: UnionType.cs プロジェクト: cjp666/GraphQLCodeGen
 public void Resolve(GraphQLDocument doc)
 {
     this.Types = this.op.Types.Select(x => doc.ResolveType(x)).ToList();
 }