Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 18, 2025

Bumps gql from 3.5.3 to 4.0.0.

Release notes

Sourced from gql's releases.

v4.0.0

Breaking Changes

  • Change transports prototype using GraphQLRequest (#551)
  • Using GraphQLRequest instead of DocumentNode for gql, execute, subscribe methods (#556): This is a big change:
    • the gql and dsl_gql methods will now return a GraphQLRequest instead of a Document Node a GraphQLRequest is an object containing the document and optional variable_values and operation_name
    • ALL the execute and subscribe methods now receive a GraphQLRequest as main argument instead of a DocumentNode, variable_values and operation_name arguments
    • The old method of sending variable_values as an argument of execute or subscribe still works but is deprecated See https://gql.readthedocs.io/en/latest/usage/variables.html for the new syntax.
  • Fix subscription task cancel exception swallow (#548): Previously if a task was cancelled while a subscription task was active, the asyncio.CancelledError Exception would be swallowed by our code. This is not the case anymore so you should now trap that Exception yourself.
  • Clean up the file upload interface with FileVar class (#549): The file upload functionality has been modified to require FileVar instances for uploaded files (the old method still works but is deprecated). See https://gql.readthedocs.io/en/latest/usage/file_upload.html
  • Set logging level to DEBUG for all transports (#552)
  • introspection now requests deprecated input fields by default (#553)
  • Trapping dependencies Exceptions into TransportConnectionFailed (#558): Now gql will trap Exceptions raised by dependencies when executing a request and will encapsulate that Exception into the TransportConnectionFailed Exception
  • Set ssl=True by default for AIOHTTPTransport (#538) (issue #529)
  • New TransportConnectionClosed Exception replacing ConnectionClosed Exception (#536)
  • websocket attribute removed from transport, now using _connected instead (#536)
  • Upgrade lastest websockets and Exceptions overhaul (#543)

Features

Batching requests is now fully supported, on sync or async transports, with automatic batching:

  • Implementation of execute_batch for async transports (#550)
  • Implementation of automatic batching for async (#554)

See https://gql.readthedocs.io/en/latest/advanced/batching_requests.html

Fixes

  • Fix httpx test deprecated warning (#542)
  • Refactor websockets transports (#536) :

Refactor WebSockets Transport with Dependency Injection Architecture

This major architectural improvement implements dependency injection patterns across the WebSockets transport layer, creating a more modular, testable, and extensible system:

  • Created abstract AdapterConnection interface in common/adapters/connection.py
  • Implemented concrete WebSocketsAdapter to wrap the websockets library
  • Moved websockets_base.py to common/base.py maintaining better structure which is independant of the websockets library used

... (truncated)

Commits
  • 059caba Bump version number to 4.0.0
  • 7695620 Restrict graphql-core to <3.3 instead of <3.2.7 on stable branch
  • 16c76bf Merge branch 'master' into stable
  • dba4953 Documentation improvements (#561)
  • a90f923 Bump version number to 4.0.0b0
  • 4af703e Trapping dependencies Exceptions into TransportConnectionFailed (#558)
  • 4fa1553 Refactor transports (#557)
  • b3789ef Using GraphQLRequest instead of DocumentNode for gql, execute, subscribe meth...
  • b221c0e Remove MIT license classifier (#555)
  • 7fcb5b6 Implementation of automatic batching for async (#554)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Aug 18, 2025
@dependabot dependabot bot force-pushed the dependabot/pip/gql-4.0.0 branch from f02ac25 to 8a75d49 Compare August 19, 2025 17:01
@ekampf
Copy link
Contributor

ekampf commented Aug 19, 2025

@dependabot recreate

@dependabot dependabot bot force-pushed the dependabot/pip/gql-4.0.0 branch from 8a75d49 to fdc856c Compare August 19, 2025 17:16
Bumps [gql](https://github.com/graphql-python/gql) from 3.5.3 to 4.0.0.
- [Release notes](https://github.com/graphql-python/gql/releases)
- [Commits](graphql-python/gql@v3.5.3...v4.0.0)

---
updated-dependencies:
- dependency-name: gql
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/pip/gql-4.0.0 branch from fdc856c to 6a3a04a Compare August 19, 2025 20:46
@clement0010 clement0010 requested a review from minhtule August 20, 2025 03:31
@clement0010
Copy link
Contributor

gql@4.0.0 has introduced a few breaking changes, one of the change which affected us is this (PR), which removed variable_values from graphql_client.execute(). We need to construct GraphQLRequest instance to include variable_values.

In addition, gql now returns GraphQLRequest instead of DocumentNode, so we need to update how we use print_ast to get the document attribute.

gql and dsl_gql methods now returns a GraphQLRequest instead of a DocumentNode
all execute and subscribe methods of Client and sessions now expects a GraphQLRequest instead of a DocumentNode

Copy link
Contributor

@minhtule minhtule left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@minhtule minhtule requested a review from ekampf August 20, 2025 04:48
@ekampf ekampf merged commit b9ef473 into main Aug 20, 2025
22 of 23 checks passed
@ekampf ekampf deleted the dependabot/pip/gql-4.0.0 branch August 20, 2025 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants