Exemplo n.º 1
0
 public ValidationSchema()
 {
     RegisterType <TestField>();
     Query = new ValidationQueryRoot {
         Name = "Query"
     };
     FieldNameConverter = new CamelCaseFieldNameConverter();
 }
    public ValidationSchema()
    {
        Query = new ValidationQueryRoot();
        this.RegisterType <Dog>();
        this.RegisterType <Cat>();
        this.RegisterType <Human>();
        this.RegisterType <Alien>();

        Directives.Register(
            new Directive("onQuery", DirectiveLocation.Query),
            new Directive("onMutation", DirectiveLocation.Mutation),
            new Directive("directiveA", DirectiveLocation.Field),
            new Directive("directiveB", DirectiveLocation.Field),
            new Directive("directive", DirectiveLocation.Field),
            new Directive("rep", DirectiveLocation.Field)
        {
            Repeatable = true
        },

            new LengthDirective()
            );
    }