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
fix(instrumentation-graphql): stop using types from graphql library in public api (open-telemetry#1268)
* fix(instrumentation-graphql): stop using types from graphql lib in instrumentation
This ensures that whenever someone imports the graphql instrumentation
lib while not having the `graphql` package installed, their typescript
build still passes.
The scenario can happen when using the auto instrumentation packages
which import a ton of intrumentation libs but only load them if the
instrumented package is present.
Signed-off-by: Boris Bera <[email protected]>
* fix(instrumentation-graphql): replace ExecutionResult with any in GraphQLInstrumentationExecutionResponseHook
This ensures that we don't import types from the `graphql` library in
our type declarations.
Since the type annotation is now gone, I have added documentation
linking to all the implementations of the `ExecutionResult` in the
supported `graphql` versions.
* fix(instrumentation-graphql): remove graphql as a peerDependency
Now that the types are no longer re-exported the dependency on `graphql`
doesn't make much sense.
This change also has the benefit of letting users who use auto
intrumentation and that have strict peerDependency requirements (if
they're using pnpm for example) to use this intrumentation without
needing to install `graphql`.
Signed-off-by: Boris Bera <[email protected]>
0 commit comments