public void SetUp() { this.schema = new GraphQLSchema(); var rootType = new RootQueryType(); var nestedType = new NestedQueryType(); nestedType.Field("howdy", () => "xzyt"); var anotherSestedType = new AnotherNestedQueryType(); anotherSestedType.Field("stuff", () => "a"); nestedType.Field("anotherNested", () => anotherSestedType); rootType.Field("nested", () => nestedType); var typeWithAccessor = new CustomObject(); typeWithAccessor.Field("Hello", e => e.Hello); typeWithAccessor.Field("Test", e => e.Test); rootType.Field("acessorBasedProp", () => new TestType() { Hello = "world", Test = "stuff" }); this.schema.AddKnownType(rootType); this.schema.AddKnownType(anotherSestedType); this.schema.AddKnownType(nestedType); this.schema.AddKnownType(typeWithAccessor); this.schema.Query(rootType); }
public void SetUp() { this.schema = new GraphQLSchema(); var rootType = new RootQueryType(); schema.Query(rootType); }
public void SetUp() { this.schema = new GraphQLSchema(); var nestedType = new NestedQueryType(this.schema); var rootType = new RootQueryType(nestedType, this.schema); this.schema.Query(rootType); }
public Schema() { var queryType = new RootQueryType(); this.AddKnownType(new ModelSchemaType()); this.AddKnownType(queryType); this.Query(queryType); }
public void SetUp() { this.schema = new GraphQLSchema(); var rootType = new RootQueryType(); schema.Query(rootType); this.singleOperationQuery = "query q1 { a : hello }"; this.multipleOperationQuery = "query q1 { a : hello } query q2 { b : hello }"; }
public void SetUp() { this.schema = new GraphQLSchema(); var rootType = new RootQueryType(); var nestedType = new NestedQueryType(); nestedType.Field("howdy", () => "xzyt"); var anotherSestedType = new AnotherNestedQueryType(); anotherSestedType.Field("stuff", () => "a"); nestedType.Field("anotherNested", () => anotherSestedType); rootType.Field("nested", () => nestedType); var typeWithAccessor = new CustomObject(); typeWithAccessor.Field("Hello", e => e.Hello); typeWithAccessor.Field("Test", e => e.Test); var anotherTypeWithAccessor = new AnotherCustomObject(); anotherTypeWithAccessor.Field("Hello", e => e.Hello); anotherTypeWithAccessor.Field("World", e => e.World); var customInterface = new CustomInterface(); customInterface.Field("hello", e => e.Hello); rootType.Field("acessorBasedProp", () => new TestType() { Hello = "world", Test = "stuff" }); rootType.Field("testTypes", () => new ITestInterface[] { new TestType { Hello = "world", Test = "stuff" }, new AnotherTestType { Hello = "world", World = "hello" } }); this.schema.AddKnownType(new TestEnumType()); this.schema.AddKnownType(rootType); this.schema.AddKnownType(anotherSestedType); this.schema.AddKnownType(nestedType); this.schema.AddKnownType(typeWithAccessor); this.schema.AddKnownType(anotherTypeWithAccessor); this.schema.AddKnownType(customInterface); 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.Query(rootType); }
public void SetUp() { this.schema = new GraphQLSchema(); var rootType = new RootQueryType(this.schema); var nestedType = new NestedQueryType(); var mutation = new RootMutationType(this.schema); this.schema.AddKnownType(rootType); this.schema.AddKnownType(nestedType); this.schema.AddKnownType(mutation); this.schema.Query(rootType); this.schema.Mutation(mutation); }
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 void SetUp() { this.schema = new GraphQLSchema(); var type2 = new T2(this.schema); var type1 = new T1(type2, this.schema); var t2interface = new T2Interface(this.schema); var rootType = new RootQueryType(type1, t2interface, this.schema); this.schema.AddKnownType(type1); this.schema.AddKnownType(type2); this.schema.AddKnownType(t2interface); this.schema.AddKnownType(rootType); this.schema.AddKnownType(new SampleInputObjectType()); this.schema.Query(rootType); }