public void SetUp()
        {
            this.schema = new GraphQLSchema();
            var rootType = new RootQueryType();

            schema.Query(rootType);
        }
示例#2
0
        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 }";
        }
示例#3
0
        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);
        }
示例#5
0
 public QueryRootType(GraphQLSchema schema) : base("Root", "")
 {
     schema.AddKnownType(this);
     schema.Query(this);
 }