Open jdolle opened 8 months ago
Hi, thank you for raising this to our attention!
I have just added a test to our testing kit, and it appears the execution order is correct in both Envelop and Testkit. So the problem you are facing is probably not related to this.
In fact, from what I see, it's a bit strange that you are seeing traces in the the normal execution, since your plugin's hooks should be executed before useApolloTracing
ones (and if I well remember, it adds the tracing in onExecuteDone
too. So if it happens in normal execution, it means something else is actually putting this tracing information elsewhere. Are you sure you don't also have the tracing plugin directly in your yoga configuration?
Can you provide a minimal reproduction with a Stackblitz or a repo we can clone?
Issue workflow progress
Progress of the issue based on the Contributor Workflow
@envelop/*
packages that you are using.Describe the bug
addPlugin
behavior differs forcreateTestkit
vs passing plugins intographql-yoga
'screateYoga
To Reproduce Steps to reproduce the behavior:
Expected behavior
test kit flow call order should match yoga server / envelop server. In both cases for the example above, the result should include the trace data.
Environment:
@envelop/*
versions:@envelop/core
:5.0.0
graphql-yoga
:5.1.1
envelop/testing
:7.0.0
Additional context
If instead of implementing onExecute, I use
addPlugin
to add the same logic, it calls in the expected order from the testkit