DiederikvandenB / apollo-link-sentry

Apollo Link middleware which enriches SentryJS with GraphQL data
MIT License
123 stars 36 forks source link

Sentry v8 compatibility #466

Closed Slessi closed 6 months ago

Slessi commented 6 months ago

Sentry v8 has been released, which has breaking changes that affect the ability to use plugin.

The issue seems to be this dependency:

"@sentry/browser": "^7.41.0"

https://docs.sentry.io/platforms/javascript/migration/v7-to-v8/#conflicting-dependency-versions-with-bundler-plugins

The Sentry JavaScript Bundler Plugins (@sentry/webpack-plugin, @sentry/vite-plugin, @sentry/esbuild-plugin, @sentry/rollup-plugin) used to depend on certain Sentry SDK packages on version 7 wich may clash with version 8 of the SDK.

This is not one of the mentioned plugins but the same conflict situation seems to be occurring. When trying to use this plugin, I get tthis error:

ApolloError: getHubFromCarrier(...).isOlderThan is not a function
    at new ApolloError2 (chunk-RTGEHEDD.js?v=aff74ec4:280:26)
    at chunk-RTGEHEDD.js?v=aff74ec4:5479:66
    at both (chunk-ZQZ3ZDHD.js?v=aff74ec4:2856:17)
    at chunk-ZQZ3ZDHD.js?v=aff74ec4:2845:26
    at new Promise (<anonymous>)
    at Object.then (chunk-ZQZ3ZDHD.js?v=aff74ec4:2844:16)
    at Object.error (chunk-ZQZ3ZDHD.js?v=aff74ec4:2858:39)
    at notifySubscription (chunk-ZQZ3ZDHD.js?v=aff74ec4:1788:13)
    at onNotify (chunk-ZQZ3ZDHD.js?v=aff74ec4:1827:3)
    at SubscriptionObserver2.error (chunk-ZQZ3ZDHD.js?v=aff74ec4:1868:5) 
spawnia commented 6 months ago

Can you provide a pull request with an update to v8? I am currently not looking to upgrade myself, but would be willing to review and merge.

github-actions[bot] commented 6 months ago

:tada: This issue has been resolved in version 4.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

spawnia commented 6 months ago

Thank you @Slessi for working through this.