()
| 219 | } |
| 220 | |
| 221 | func (p *parser) parseFragmentDefinition() *FragmentDefinition { |
| 222 | var def FragmentDefinition |
| 223 | def.Position = p.peekPos() |
| 224 | def.Comment = p.comment |
| 225 | p.expectKeyword("fragment") |
| 226 | |
| 227 | def.Name = p.parseFragmentName() |
| 228 | def.VariableDefinition = p.parseVariableDefinitions() |
| 229 | |
| 230 | p.expectKeyword("on") |
| 231 | |
| 232 | def.TypeCondition = p.parseName() |
| 233 | def.Directives = p.parseDirectives(false) |
| 234 | def.SelectionSet = p.parseRequiredSelectionSet() |
| 235 | return &def |
| 236 | } |
| 237 | |
| 238 | func (p *parser) parseFragmentName() string { |
| 239 | if p.peek().Value == "on" { |
no test coverage detected