@@ -112,14 +112,14 @@ def deeper(self):
112
112
})
113
113
114
114
schema = GraphQLSchema (query = DataType )
115
- executor = Executor (schema )
115
+ executor = Executor ()
116
116
117
117
def handle_result (result ):
118
118
assert not result .errors
119
119
assert result .data == expected
120
120
121
- raise_callback_results (executor .execute (doc , Data (), {'size' : 100 }, 'Example' ), handle_result )
122
- raise_callback_results (executor .execute (doc , Data (), {'size' : 100 }, 'Example' , execute_serially = True ),
121
+ raise_callback_results (executor .execute (schema , doc , Data (), {'size' : 100 }, 'Example' ), handle_result )
122
+ raise_callback_results (executor .execute (schema , doc , Data (), {'size' : 100 }, 'Example' , execute_serially = True ),
123
123
handle_result )
124
124
125
125
@@ -142,9 +142,9 @@ def notPromise(self):
142
142
}
143
143
'''
144
144
schema = GraphQLSchema (query = DataType )
145
- executor = Executor (schema , [SynchronousExecutionMiddleware ()])
145
+ executor = Executor ([SynchronousExecutionMiddleware ()])
146
146
147
- result = executor .execute (doc , Data (), operation_name = 'Example' )
147
+ result = executor .execute (schema , doc , Data (), operation_name = 'Example' )
148
148
assert not isinstance (result , Deferred )
149
149
assert result .data == {"promise" : None , 'notPromise' : 'i should work' }
150
150
formatted_errors = list (map (format_error , result .errors ))
@@ -172,9 +172,9 @@ def notPromise(self):
172
172
}
173
173
'''
174
174
schema = GraphQLSchema (query = DataType )
175
- executor = Executor (schema , [SynchronousExecutionMiddleware ()])
175
+ executor = Executor ([SynchronousExecutionMiddleware ()])
176
176
177
- result = executor .execute (doc , Data (), operation_name = 'Example' )
177
+ result = executor .execute (schema , doc , Data (), operation_name = 'Example' )
178
178
assert not isinstance (result , Deferred )
179
179
assert result .data is None
180
180
formatted_errors = list (map (format_error , result .errors ))
@@ -202,9 +202,9 @@ def notPromise(self):
202
202
}
203
203
'''
204
204
schema = GraphQLSchema (query = DataType )
205
- executor = Executor (schema )
205
+ executor = Executor ()
206
206
207
- result = executor .execute (doc , Data (), operation_name = 'Example' )
207
+ result = executor .execute (schema , doc , Data (), operation_name = 'Example' )
208
208
assert result .called
209
209
result = result .result
210
210
assert result .data is None
@@ -227,9 +227,9 @@ def promise(self):
227
227
}
228
228
'''
229
229
schema = GraphQLSchema (query = DataType )
230
- executor = Executor (schema , [SynchronousExecutionMiddleware ()])
230
+ executor = Executor ([SynchronousExecutionMiddleware ()])
231
231
232
- result = executor .execute (doc , Data (), operation_name = 'Example' )
232
+ result = executor .execute (schema , doc , Data (), operation_name = 'Example' )
233
233
assert not isinstance (result , Deferred )
234
234
assert result .data == {"promise" : 'I should work' }
235
235
assert not result .errors
0 commit comments