Skip to content

Commit

Permalink
Fix parse operation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelnikolov authored Sep 11, 2023
1 parent 64937ad commit 12e9b90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func parseOperation(l *common.Lexer, opType ast.OperationType) *ast.OperationDef
if l.Peek() == scanner.Ident {
op.Name = l.ConsumeIdentWithLoc()
}
op.Directives = common.ParseDirectives(l)
if l.Peek() == '(' {
l.ConsumeToken('(')
for l.Peek() != ')' {
Expand All @@ -81,6 +80,7 @@ func parseOperation(l *common.Lexer, opType ast.OperationType) *ast.OperationDef
}
l.ConsumeToken(')')
}
op.Directives = common.ParseDirectives(l)
op.Selections = parseSelectionSet(l)
return op
}
Expand Down

0 comments on commit 12e9b90

Please sign in to comment.