(w io.Writer, fields ast.FieldList)
| 141 | } |
| 142 | |
| 143 | func writeGraphQLFields(w io.Writer, fields ast.FieldList) { |
| 144 | for _, f := range fields { |
| 145 | if strings.HasPrefix(f.Name, "__") { |
| 146 | continue |
| 147 | } |
| 148 | line := fmt.Sprintf(" %s: %s", f.Name, f.Type.String()) |
| 149 | if f.Directives.ForName("deprecated") != nil { |
| 150 | line += " (deprecated)" |
| 151 | } |
| 152 | fmt.Fprintln(w, line) |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | func writeGraphQLField(w io.Writer, schema *ast.Schema, def *ast.Definition, f *ast.FieldDefinition) { |
| 157 | input := def.Kind == ast.InputObject |
no test coverage detected