You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason I'm still investigating, Object.create(request) is not creating a truly independent clone of the request object, so the Mercurius context is still getting shared among all the batched queries.
This needs further investigation to find a proper fix, and once fixed hook spies (i.e. onResolution) should be added to double check the context values at different points of the request (since the resolver spy has proven to be incapable of catching the error).
The text was updated successfully, but these errors were encountered:
My fault: when I moved from cloning just the context to cloning the full request I didn't take into account that Object.create(request) would not clone the properties inside the context, just reference them (as they sit at a 2nd level inside the request).
#849 didn't finally fix #842.
For some reason I'm still investigating,
Object.create(request)
is not creating a truly independent clone of the request object, so the Mercurius context is still getting shared among all the batched queries.This needs further investigation to find a proper fix, and once fixed hook spies (i.e.
onResolution
) should be added to double check the context values at different points of the request (since the resolver spy has proven to be incapable of catching the error).The text was updated successfully, but these errors were encountered: