()
| 281 | } |
| 282 | |
| 283 | func (p *parser) parseInputValueDef() *FieldDefinition { |
| 284 | var def FieldDefinition |
| 285 | |
| 286 | desc := p.parseDescription() |
| 287 | if desc.text != "" { |
| 288 | def.BeforeDescriptionComment = desc.comment |
| 289 | def.Description = desc.text |
| 290 | } |
| 291 | |
| 292 | p.peek() // peek to set p.comment |
| 293 | def.AfterDescriptionComment = p.comment |
| 294 | def.Position = p.peekPos() |
| 295 | def.Name = p.parseName() |
| 296 | p.expect(lexer.Colon) |
| 297 | def.Type = p.parseTypeReference() |
| 298 | if p.skip(lexer.Equals) { |
| 299 | def.DefaultValue = p.parseValueLiteral(true) |
| 300 | } |
| 301 | def.Directives = p.parseDirectives(true) |
| 302 | return &def |
| 303 | } |
| 304 | |
| 305 | func (p *parser) parseInterfaceTypeDefinition(description descriptionWithComment) *Definition { |
| 306 | _, comment := p.expectKeyword("interface") |
no test coverage detected