@@ -47,16 +47,9 @@ local function shouldIncludeNode(selection, context)
47
47
end
48
48
49
49
local function doesFragmentApply (fragment , type , context )
50
-
51
- -- print('print from doesFragmentApply - 51')
52
- -- print('fragment')
53
- -- require('pl.pretty').dump(fragment)
54
-
55
50
if not fragment .typeCondition then return true end
56
51
57
52
local innerType = typeFromAST (fragment .typeCondition , context .schema )
58
- -- print('innerType')
59
- -- require('pl.pretty').dump(innerType)
60
53
61
54
if innerType == type then
62
55
return true
@@ -163,13 +156,6 @@ local function completeValue(fieldType, result, subSelections, context)
163
156
local completedResult = completeValue (innerType , result , subSelections , context )
164
157
165
158
if completedResult == nil then
166
- -- @todo remove comments
167
- -- print('print from completeValue')
168
- -- print('result')
169
- -- require('pl.pretty').dump(result)
170
- -- print('fieldType')
171
- -- require('pl.pretty').dump(fieldType)
172
-
173
159
error (' No value provided for non-null ' .. (innerType .name or innerType .__type ))
174
160
end
175
161
@@ -189,15 +175,6 @@ local function completeValue(fieldType, result, subSelections, context)
189
175
190
176
local values = {}
191
177
for i , value in ipairs (result ) do
192
- -- @todo remove comments
193
- -- print('print for ipairs(result) 195')
194
- -- require('pl.pretty').dump(result)
195
- -- print('value')
196
- -- require('pl.pretty').dump(value)
197
- -- print('subSelections')
198
- -- require('pl.pretty').dump(subSelections)
199
-
200
-
201
178
values [i ] = completeValue (innerType , value , subSelections , context )
202
179
end
203
180
@@ -223,11 +200,6 @@ local function getFieldEntry(objectType, object, fields, context)
223
200
local firstField = fields [1 ]
224
201
local fieldName = firstField .name .value
225
202
local responseKey = getFieldResponseKey (firstField )
226
- -- print('print from getFieldEntry')
227
- -- print('objectType')
228
- -- require('pl.pretty').dump(objectType)
229
- -- print('object itself')
230
- -- require('pl.pretty').dump(object)
231
203
local fieldType = introspection .fieldMap [fieldName ] or objectType .fields [fieldName ]
232
204
233
205
if fieldType == nil then
@@ -264,16 +236,6 @@ local function getFieldEntry(objectType, object, fields, context)
264
236
end
265
237
266
238
evaluateSelections = function (objectType , object , selections , context )
267
-
268
- -- @todo remove debug
269
- -- print('EVALUETE SELECTIONS')
270
- ---- print('objectType')
271
- ---- require('pl.pretty').dump(objectType)
272
- -- print('object')
273
- -- require('pl.pretty').dump(object)
274
- --
275
- -- print('EVALUETE SELECTIONS CLOSE')
276
-
277
239
local groupedFieldSet = collectFields (objectType , selections , {}, {}, context )
278
240
279
241
return util .map (groupedFieldSet , function (fields )
0 commit comments