public void SetUp() { this.schema = new GraphQLSchema(); var rootType = new RootQueryType(); schema.Query(rootType); }
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 NoMutationDefined_ShouldReturnNullInIntrospection() { var emptySchema = new GraphQLSchema(); emptySchema.Query(new T1()); var result = emptySchema.Execute("{ __schema { mutationType { name } } }"); Assert.IsNull(result.data.__schema.mutationType); }
public void SetUp() { this.schema = new GraphQLSchema(); var graphQLClassBasedModel = new GraphQLClassBasedModel(); var graphQLStructBasedModel = new GraphQLStructBasedModel(); var graphQLEnumBasedModel = new GraphQLEnumBasedModel(); this.schema.AddKnownType(graphQLClassBasedModel); this.schema.AddKnownType(graphQLStructBasedModel); this.schema.AddKnownType(graphQLEnumBasedModel); schema.Query(graphQLClassBasedModel); }
public QueryRootType(GraphQLSchema schema) : base("Root", "") { schema.AddKnownType(this); schema.Query(this); }