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("}"); }