Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(instrumentation-graphql): stop using types from
graphql
library…
… in public api (#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 <bbera@coveo.com> * 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 <bbera@coveo.com>
- Loading branch information