public NestedQueryType(NestedNonGenericQueryType nestedTypeNonGeneric) : base("NestedQueryType", "") { this.Field(instance => instance.Id); this.Field(instance => instance.StringField); this.Field(instance => instance.StringArray); this.Field("enumField", instance => instance.Enum); this.Field("nested", (int id) => nestedTypeNonGeneric); this.Field("defaultField", (IContext <TestObject> context, string argument) => $"{context.Instance.StringField}+{argument}") .WithDefaultValue("argument", "defaultArgument"); }
public void SetUp() { this.schema = new GraphQLSchema(); var rootType = new RootQueryType(this.schema); var nestedTypeNonGeneric = new NestedNonGenericQueryType(); var nestedType = new NestedQueryType(nestedTypeNonGeneric); this.schema.AddKnownType(rootType); this.schema.AddKnownType(nestedTypeNonGeneric); this.schema.AddKnownType(nestedType); this.schema.Query(rootType); }
public void SetUp() { this.schema = new GraphQLSchema(); var rootType = new RootQueryType(this.schema); var nestedTypeNonGeneric = new NestedNonGenericQueryType(); var nestedType = new NestedQueryType(nestedTypeNonGeneric); this.schema.AddKnownType(rootType); this.schema.AddKnownType(nestedTypeNonGeneric); this.schema.AddKnownType(nestedType); this.schema.AddKnownType(new InputTestObjectType()); this.schema.AddKnownType(new TestEnumType()); this.schema.AddOrReplaceDirective(new DefaultArgumentDirectiveType()); this.schema.Query(rootType); }
public NestedQueryType(NestedNonGenericQueryType nestedTypeNonGeneric) : base("NestedQueryType", "") { this.Field(instance => instance.Id); this.Field(instance => instance.StringField); this.Field("nested", () => nestedTypeNonGeneric); }