Skip to content

Commit 479c2bc

Browse files
committed
Fixed playground when there are not variable values
1 parent 2981853 commit 479c2bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

playground/GraphenePlayground.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ assert schema, 'You have to define a schema'
192192
return this.pypyjs.then(() => {
193193
var x = `
194194
import json
195-
variables = json.loads('''${variables}''')
195+
variables = json.loads('''${variables || "{}"}''')
196196
result = schema.execute('''${query}''', variable_values=variables, executor=__graphene_executor)
197197
result_dict = {};
198198
if result.errors:
@@ -201,6 +201,7 @@ if result.data:
201201
result_dict['data'] = result.data
202202
result_json = json.dumps(result_dict)
203203
`;
204+
// console.log(x)
204205
return this.pypy_interpreter.exec(x)
205206
}
206207
).then(() =>

0 commit comments

Comments
 (0)