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

Commit df60de0

Browse files
committed
WIP: fix undefined variable error
1 parent f5786c8 commit df60de0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

graphql/core/rules.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ function rules.variablesAreUsed(node, context)
400400
for _, definition in ipairs(node.variableDefinitions) do
401401
local variableName = definition.variable.name.value
402402
if not context.variableReferences[variableName] then
403-
--error('Unused variable "' .. variableName .. '"')
403+
error('Unused variable "' .. variableName .. '"')
404404
end
405405
end
406406
end

graphql/core/validate.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,12 @@ local visitors = {
259259
end
260260
end,
261261

262+
children = function(node)
263+
print('DDDDDD: ' .. require('yaml').encode(node))
264+
return node.value
265+
end,
266+
-- XXX: add visitor for inputObject?
267+
262268
rules = { rules.uniqueInputObjectFields }
263269
},
264270

0 commit comments

Comments
 (0)