public void Name_ShouldSetDefaultName() { var type = new QueryGraphType(); type.Name.ShouldNotBeEmpty(); type.Name.ShouldBe("Query"); }
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>)); }
public SimpleSchema() { Query = new QueryGraphType(); RegisterType(new SimpleNodeGraphType()); }