Ejemplo n.º 1
0
        public void Name_ShouldSetDefaultName()
        {
            var type = new QueryGraphType();

            type.Name.ShouldNotBeEmpty();
            type.Name.ShouldBe("Query");
        }
Ejemplo n.º 2
0
        public void Node_ShouldImplementNodeQuery()
        {
            var type = new QueryGraphType();

            // should have node query
            type.HasField("node").ShouldBeTrue();
            // query has one argument
            type.GetField("node").Arguments.Count.ShouldBe(1);
            // query has argument
            type.GetField("node").Arguments[0].Name.ShouldBe("id");
            type.GetField("node").Arguments[0].Type.ShouldBe(typeof(NonNullGraphType <IdGraphType>));
        }
Ejemplo n.º 3
0
 public SimpleSchema()
 {
     Query = new QueryGraphType();
     RegisterType(new SimpleNodeGraphType());
 }