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

Method parseObjectTypeDefinition

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

Source from the content-addressed store, hash-verified

191}
192
193func (p *parser) parseObjectTypeDefinition(description descriptionWithComment) *Definition {
194 _, comment := p.expectKeyword("type")
195
196 var def Definition
197 def.Position = p.peekPos()
198 def.Kind = Object
199 def.BeforeDescriptionComment = description.comment
200 def.Description = description.text
201 def.AfterDescriptionComment = comment
202 def.Name = p.parseName()
203 def.Interfaces = p.parseImplementsInterfaces()
204 def.Directives = p.parseDirectives(true)
205 def.Fields, def.EndOfDefinitionComment = p.parseFieldsDefinition()
206 return &def
207}
208
209func (p *parser) parseImplementsInterfaces() []string {
210 var types []string

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