예제 #1
0
        public TestSchema()
        {
            var queryRoot = new QueryRoot();

            this.AddKnownType(queryRoot);
            this.AddKnownType(new FurColorEnum());
            this.AddKnownType(new ComplicatedObjectType());
            this.AddKnownType(new ComplicatedArgs());
            this.Query(queryRoot);
        }
예제 #2
0
        public TestSchema()
        {
            var queryRoot    = new QueryRoot();
            var mutationRoot = new MutationRoot();

            this.AddKnownType(queryRoot);
            this.AddKnownType(new SimpleInterfaceType());
            this.AddKnownType(new FurColorEnum());
            this.AddKnownType(new SimpleObjectType());
            this.AddKnownType(new AnotherSimpleObjectType());
            this.AddKnownType(new ComplicatedInterfaceType());
            this.AddKnownType(new ComplicatedParentInterfaceType());
            this.AddKnownType(new ComplicatedInputObjectType());
            this.AddKnownType(new ComplicatedObjectType());
            this.AddKnownType(new ComplicatedArgs());
            this.AddKnownType(new SimpleSampleUnionType());
            this.AddKnownType(new FieldType());
            this.AddKnownType(new DeepFieldType());
            this.AddKnownType(new DeeperFieldType());
            this.AddKnownType(new IntBoxType());
            this.AddKnownType(new SomeBoxType());
            this.AddKnownType(new StringBoxType());
            this.AddKnownType(new EdgeType());
            this.AddKnownType(new NodeType());
            this.AddKnownType(new ConnectionType());
            this.AddKnownType(new NonNullStringBox1Type());
            this.AddKnownType(new NonNullStringBox1ImplType());

            this.AddOrReplaceDirective(new TestDirective("directive", DirectiveLocation.FIELD));
            this.AddOrReplaceDirective(new TestDirective("directive1", DirectiveLocation.FIELD));
            this.AddOrReplaceDirective(new TestDirective("directive2", DirectiveLocation.FIELD));

            this.AddOrReplaceDirective(new TestDirective("onQuery", DirectiveLocation.QUERY));
            this.AddOrReplaceDirective(new TestDirective("onMutation", DirectiveLocation.MUTATION));
            this.AddOrReplaceDirective(new TestDirective("onSubscription", DirectiveLocation.SUBSCRIPTION));
            this.AddOrReplaceDirective(new TestDirective("onField", DirectiveLocation.FIELD));
            this.AddOrReplaceDirective(new TestDirective("onFragmentDefinition", DirectiveLocation.FRAGMENT_DEFINITION));
            this.AddOrReplaceDirective(new TestDirective("onFragmentSpread", DirectiveLocation.FRAGMENT_SPREAD));
            this.AddOrReplaceDirective(new TestDirective("onInlineFragment", DirectiveLocation.INLINE_FRAGMENT));
            this.AddOrReplaceDirective(new TestDirective("onSchema", DirectiveLocation.SCHEMA));
            this.AddOrReplaceDirective(new TestDirective("onScalar", DirectiveLocation.SCALAR));
            this.AddOrReplaceDirective(new TestDirective("onObject", DirectiveLocation.OBJECT));
            this.AddOrReplaceDirective(new TestDirective("onFieldDefinition", DirectiveLocation.FIELD_DEFINITION));
            this.AddOrReplaceDirective(new TestDirective("onArgumentDefinition", DirectiveLocation.ARGUMENT_DEFINITION));
            this.AddOrReplaceDirective(new TestDirective("onInterface", DirectiveLocation.INTERFACE));
            this.AddOrReplaceDirective(new TestDirective("onUnion", DirectiveLocation.UNION));
            this.AddOrReplaceDirective(new TestDirective("onEnum", DirectiveLocation.ENUM));
            this.AddOrReplaceDirective(new TestDirective("onEnumValue", DirectiveLocation.ENUM_VALUE));
            this.AddOrReplaceDirective(new TestDirective("onInputObject", DirectiveLocation.INPUT_OBJECT));
            this.AddOrReplaceDirective(new TestDirective("onInputFieldDefinition", DirectiveLocation.INPUT_FIELD_DEFINITION));

            this.Query(queryRoot);
            this.Mutation(mutationRoot);
        }