Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4777 +/- ##
==========================================
+ Coverage 84.61% 84.69% +0.07%
==========================================
Files 158 158
Lines 16376 16376
Branches 2809 2809
==========================================
+ Hits 13857 13869 +12
+ Misses 1693 1684 -9
+ Partials 826 823 -3 |
| {py3.9,py3.12,py3.13}-gql-v4.2.0b0 | ||
|
|
There was a problem hiding this comment.
Potential bug: The GQL integration will crash with gql>=4.2.0b0 because client.execute now passes a GraphQLRequest object, but the integration expects a DocumentNode.
-
Description: The update to
gql>=4.2.0b0introduces a breaking change whereclient.executereceives aGraphQLRequestobject instead of aDocumentNode. The Sentry integration's patchedexecutemethod passes this object to_data_from_document, which expects aDocumentNode. This will cause a runtime crash when helper functions likeget_operation_ast(document)are called with the wrong object type. This will affect all users of the GQL integration who upgrade to the new version and make any GraphQL request. -
Suggested fix: In the patched
executemethod, check if thedocumentargument is an instance ofGraphQLRequest. If so, extract theDocumentNodefrom its.documentattribute before passing it to the_data_from_documentfunction. This will restore compatibility with the newgqlversion's API.
severity: 0.85, confidence: 0.98
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
This is actually a real concern, though it's already in 4.0.0. I'll make a separate PR for this
No description provided.