Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit eac21e2

Browse files
committed
Fix <operation> query AST node format
1 parent 9b8435b commit eac21e2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

graphql/core/parse.lua

+1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ local function cOperation(...)
150150

151151
for i = 2, #args do
152152
-- key ~= nil => result['selectionSet'] = <...>
153+
-- or result['name'] = <...>
153154
-- key == nil => result['variableDefinitions'] = <...>
154155
-- or result['directives'] = <...>
155156
local key = args[i].kind

graphql/core/validate.lua

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ local visitors = {
5151
-- {
5252
-- kind = 'operation',
5353
-- operation = 'query' or 'mutation',
54+
-- name = {
55+
-- kind = 'name',
56+
-- value = <string>,
57+
-- } (optional),
5458
-- selectionSet = <selectionSet>,
5559
-- variableDefinitions = list of <variableDefinition> (optional),
5660
-- directives = list of <directive> (optional),

0 commit comments

Comments
 (0)