private void SetupIntrospectionFields(GraphQLObjectType objectType) { if (!objectType.ContainsField("__schema")) { objectType.Field("__schema", () => this.IntrospectedSchema); } if (!objectType.ContainsField("__type")) { objectType.Field("__type", (string name) => this.GetGraphQLType(name)); } }
public void Query(GraphQLObjectType root) { this.QueryType = root; this.SetupIntrospectionFields(root); }
public static void Field <T1, T2>(this GraphQLObjectType @this, string name, Expression <Func <T1, T2> > resolver) => @this.Field <T2>(name, resolver);
public void Mutation(GraphQLObjectType root) { this.MutationType = root; }
public static void Field <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(this GraphQLObjectType @this, string name, Expression <Func <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> > resolver) => @this.Field <T10>(name, resolver);
public void Query(GraphQLObjectType root) { this.QueryType = root; }
private GraphQLFieldConfig GetFieldFromObject(GraphQLObjectType type, string fieldName) { var fieldInfo = type.GetFieldInfo(fieldName); return(this.CreateFieldConfigTypeFromFieldInfo(fieldInfo)); }
public static FieldDefinitionBuilder Field <T1>(this GraphQLObjectType @this, string name, Expression <Func <T1> > resolver, string description = null) => @this.Field(name, resolver, description);
public static FieldDefinitionBuilder Field <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(this GraphQLObjectType @this, string name, Expression <Func <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> > resolver, string description = null) => @this.Field(name, resolver, description);