public static void WriteObjectValue( this DocumentWriter writer, ObjectValueNode node) { writer.Write("{ "); writer.WriteMany(node.Fields, (n, w) => w.WriteObjectField(n)); writer.Write(" }"); }
public static void WriteListValue( this DocumentWriter writer, ListValueNode node) { writer.Write("[ "); writer.WriteMany(node.Items, (n, w) => w.WriteValue(n)); writer.Write(" ]"); }
public static void WriteDirective( this DocumentWriter writer, DirectiveNode node) { writer.Write('@'); writer.WriteName(node.Name); if (node.Arguments.Any()) { writer.Write('('); writer.WriteMany(node.Arguments, (n, w) => w.WriteArgument(n)); writer.Write(')'); } }