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

Method parseRequiredSelectionSet

parser/query.go:133–145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

131}
132
133func (p *parser) parseRequiredSelectionSet() SelectionSet {
134 if p.peek().Kind != lexer.BraceL {
135 p.error(p.peek(), "Expected %s, found %s", lexer.BraceL, p.peek().Kind.String())
136 return nil
137 }
138
139 var selections []Selection
140 p.some(lexer.BraceL, lexer.BraceR, func() {
141 selections = append(selections, p.parseSelection())
142 })
143
144 return selections
145}
146
147func (p *parser) parseSelection() Selection {
148 if p.peek().Kind == lexer.Spread {

Callers 3

parseFragmentMethod · 0.95

Calls 5

peekMethod · 0.95
errorMethod · 0.95
someMethod · 0.95
parseSelectionMethod · 0.95
StringMethod · 0.45

Tested by

no test coverage detected