예제 #1
0
 public void Write(GraphQLWriter writer)
 {
     writer.Write("students", _meta);
     writer.Write(_meta);
     writer.WriteLine(" {");
     writer.PushIndent();
     foreach (var v in _children)
     {
         v.Write(writer);
     }
     writer.PopIndent();
     writer.WriteLine("}");
 }
예제 #2
0
        public void Write(GraphQLWriter writer)
        {
            writer.Write("removeStudent", _meta);
            bool hasParameters = false;

            if (_id.HasValue)
            {
                if (hasParameters)
                {
                    writer.Write(", ");
                }
                else
                {
                    hasParameters = true; writer.Write("(");
                }
                writer.Write("id: ");
                writer.WriteValue(_id);
            }
            if (hasParameters)
            {
                writer.Write(")");
            }
            writer.Write(_meta);
            writer.WriteLine(" {");
            writer.PushIndent();
            foreach (var v in _children)
            {
                v.Write(writer);
            }
            writer.PopIndent();
            writer.WriteLine("}");
        }
예제 #3
0
        public void Write(GraphQLWriter writer)
        {
            writer.Write("hero", _meta);
            bool hasParameters = false;

            if (_episode.HasValue)
            {
                if (hasParameters)
                {
                    writer.Write(", ");
                }
                else
                {
                    hasParameters = true; writer.Write("(");
                }
                writer.Write("episode: ");
                writer.WriteEnumValue(_episode);
            }
            if (hasParameters)
            {
                writer.Write(")");
            }
            writer.Write(_meta);
            writer.WriteLine(" {");
            writer.PushIndent();
            writer.WriteLine("__typename");
            foreach (var v in _children)
            {
                v.Write(writer);
            }
            writer.PopIndent();
            writer.WriteLine("}");
        }
예제 #4
0
 public void Write(GraphQLWriter writer, bool json)
 {
     writer.Write("{ ");
     if (json)
     {
         writer.Write("\"id\": ");
     }
     else
     {
         writer.Write("id: ");
     }
     writer.WriteValue(id);
     if (json)
     {
         writer.Write(", ");
     }
     if (json)
     {
         writer.Write("\"name\": ");
     }
     else
     {
         writer.Write("name: ");
     }
     writer.WriteValue(name);
     if (json)
     {
         writer.Write(", ");
     }
     if (json)
     {
         writer.Write("\"class_id\": ");
     }
     else
     {
         writer.Write("class_id: ");
     }
     writer.WriteValue(class_id);
     writer.Write(" }");
 }
예제 #5
0
 public void Write(GraphQLWriter writer)
 {
     writer.Write("class_id", _meta);
     writer.Write(_meta);
     writer.WriteLine("");
 }
예제 #6
0
 public void Write(GraphQLWriter writer)
 {
     writer.Write("name", _meta);
     writer.Write(_meta);
     writer.WriteLine("");
 }
예제 #7
0
 public void Write(GraphQLWriter writer)
 {
     writer.Write("appearsIn", _meta);
     writer.Write(_meta);
     writer.WriteLine("");
 }
예제 #8
0
 public void Write(GraphQLWriter writer)
 {
     writer.Write("primaryFunction", _meta);
     writer.Write(_meta);
     writer.WriteLine("");
 }
예제 #9
0
 public void Write(GraphQLWriter writer)
 {
     writer.Write("homePlanet", _meta);
     writer.Write(_meta);
     writer.WriteLine("");
 }
예제 #10
0
 public void Write(GraphQLWriter writer)
 {
     writer.Write("hasPreviousPage", _meta);
     writer.Write(_meta);
     writer.WriteLine("");
 }
예제 #11
0
 public void Write(GraphQLWriter writer)
 {
     writer.Write("hasNextPage", _meta);
     writer.Write(_meta);
     writer.WriteLine("");
 }
예제 #12
0
 public void Write(GraphQLWriter writer)
 {
     writer.Write("cursor", _meta);
     writer.Write(_meta);
     writer.WriteLine("");
 }
예제 #13
0
        public void Write(GraphQLWriter writer)
        {
            writer.Write("friends", _meta);
            bool hasParameters = false;

            if (_first.HasValue)
            {
                if (hasParameters)
                {
                    writer.Write(", ");
                }
                else
                {
                    hasParameters = true; writer.Write("(");
                }
                writer.Write("first: ");
                writer.WriteValue(_first);
            }
            if (_after.HasValue)
            {
                if (hasParameters)
                {
                    writer.Write(", ");
                }
                else
                {
                    hasParameters = true; writer.Write("(");
                }
                writer.Write("after: ");
                writer.WriteValue(_after);
            }
            if (_last.HasValue)
            {
                if (hasParameters)
                {
                    writer.Write(", ");
                }
                else
                {
                    hasParameters = true; writer.Write("(");
                }
                writer.Write("last: ");
                writer.WriteValue(_last);
            }
            if (_before.HasValue)
            {
                if (hasParameters)
                {
                    writer.Write(", ");
                }
                else
                {
                    hasParameters = true; writer.Write("(");
                }
                writer.Write("before: ");
                writer.WriteValue(_before);
            }
            if (hasParameters)
            {
                writer.Write(")");
            }
            writer.Write(_meta);
            writer.WriteLine(" {");
            writer.PushIndent();
            foreach (var v in _children)
            {
                v.Write(writer);
            }
            writer.PopIndent();
            writer.WriteLine("}");
        }