-
Notifications
You must be signed in to change notification settings - Fork 545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(instrumentation-graphql): remove graphql/types dependency #754
Conversation
Codecov Report
@@ Coverage Diff @@
## main #754 +/- ##
==========================================
- Coverage 94.90% 94.21% -0.69%
==========================================
Files 13 24 +11
Lines 707 1695 +988
Branches 142 236 +94
==========================================
+ Hits 671 1597 +926
- Misses 36 98 +62
|
Not really sure why codecov/project is failing: |
@Flarna this is actually not a revert but a fix (if I understand correctly) since the @graphql/types is deprecated and not needed anymore and as @graphql provides the types. |
The point in #468 was that types must be a dependency (not dev-dependency) otherwise users may run in typescript issues. As Therefore it is more or less a revert as it moves types from dependency back into dev-dependency. Personally l'm fine with the change as I think the instrumenation should not have such a dependendy as the risk is high to end up with two versions of graphql. But the decission made by the maintainers in #468 was a different one. |
@Flarna I agree, this is actually what happens now (2 versions of graphql) and what this PR aims to fix 👍🏻 |
I don't see graphql in the dependencies at all now |
The bottom line is that currently, the instrumentation (not-dev) requires its instrumented library. IMHO this is a big no-no that should be avoided at all costs. This is in fact causing issues to customers and hence the opened bug. |
Hi, @obecny, would highly appreciate your input on this 🙏🏻 we'd love to push this forward, as it creates a break in some of our usages due to versions conflict. |
there was a bug with certain ts version and because of this bug the meta packages were unable to be used if you don't include certain type even if you don't use it. So if this bug is still valid then removing types will simply cause the bug to happen again. If this is causing another bug then it should be simply vary how to prevent one and another bug and come out with some solution for both situations. Not sure what's the best way of fixing then 2 bugs at the same time, but whatever will be decided the both bug should be taken into consideration. After this change I would encourage to check the meta packages if the are still working fine |
Thanks, @obecny! do you happen to remember which bug was this and point us to it? |
Which problem is this PR solving?
Fixes Graphql is added as main dependency by instrumentation and may case version collision
Short description of the changes
This pr removes the @graphql/types dependency from the package.json and modifies references.