MCPcopy Create free account
hub / github.com/vektah/gqlparser / parseInterfaceTypeDefinition

Method parseInterfaceTypeDefinition

parser/schema.go:305–319  ·  view source on GitHub ↗
(description descriptionWithComment)

Source from the content-addressed store, hash-verified

303}
304
305func (p *parser) parseInterfaceTypeDefinition(description descriptionWithComment) *Definition {
306 _, comment := p.expectKeyword("interface")
307
308 var def Definition
309 def.Position = p.peekPos()
310 def.Kind = Interface
311 def.BeforeDescriptionComment = description.comment
312 def.Description = description.text
313 def.AfterDescriptionComment = comment
314 def.Name = p.parseName()
315 def.Interfaces = p.parseImplementsInterfaces()
316 def.Directives = p.parseDirectives(true)
317 def.Fields, def.EndOfDefinitionComment = p.parseFieldsDefinition()
318 return &def
319}
320
321func (p *parser) parseUnionTypeDefinition(description descriptionWithComment) *Definition {
322 _, comment := p.expectKeyword("union")

Callers 1

Calls 6

expectKeywordMethod · 0.95
peekPosMethod · 0.95
parseNameMethod · 0.95
parseDirectivesMethod · 0.95
parseFieldsDefinitionMethod · 0.95

Tested by

no test coverage detected