graphql-core-legacy
graphql-core-legacy copied to clipboard
FIX: subscription returns incorrect result when data loader is used during fields resolving.
This PR fixes batching for subscriptions.
Without this fix batch_load_fn
is called after every load
call and test_batches_subscription_result
fails on
assert subscription_results[0].data == expected_data_1
because subscription_results[0].data
contains
{'newPosts': <Promise at 0x7f9ea611c6a0 fulfilled with [OrderedDict([('id', 1), ('tag', OrderedDict([('id', 1), ('name', '#music')]))]), OrderedDict([('id', 2), ('tag', OrderedDict([('id', 2), ('name', '#beautiful')]))]), OrderedDict([('id', 3), ('tag', OrderedDict([('id', 1), ('name', '#music')]))])]>}
@syrusakbary Could you please take a look at this?
@DayS1eeper this is legacy repo, with the last commit more than 1 year ago. Probably you need https://github.com/graphql-python/graphql-core
@TitanFighter I use graphql-core 2.3.2 and graphene 2.1.9 in my project.