public void GraphQLException_SerializesToIncludeMessageAndLocations()
        {
            var node = this.GetFieldNode(new Source("{ field }"));

            var e = new GraphQLException("msg", new[] { node });

            Assert.AreEqual("{\"message\":\"msg\",\"locations\":[{\"line\":1,\"column\":3}]}",
                            e.ToString());
        }
        public void GraphQLException_SerializesToIncludeMessage()
        {
            var e = new GraphQLException("msg");

            Assert.AreEqual("{\"message\":\"msg\"}", e.ToString());
        }
        public void GraphQLException_SerializesToIncludePath()
        {
            var e = new GraphQLException("msg", null, null, null, new object[] { "path", 3, "to", "field" });

            Assert.AreEqual(new object[] { "path", 3, "to", "field" }, e.Path);
            Assert.AreEqual("{\"message\":\"msg\",\"path\":[\"path\",3,\"to\",\"field\"]}", e.ToString());
        }