Releases: graphql-python/gql
v4.0.0b0
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
anddsl_gql
methods will now return aGraphQLRequest
instead of aDocument
Node
aGraphQLRequest
is an object containing the document and optionalvariable_values
andoperation_name
- ALL the
execute
andsubscribe
methods now receive aGraphQLRequest
as main argument instead of
aDocumentNode
,variable_values
andoperation_name
arguments - The old method of sending
variable_values
as an argument ofexecute
orsubscribe
still works but is deprecated
See https://gql.readthedocs.io/en/latest/usage/variables.html for the new syntax.
- the
- Fix subscription task cancel exception swallow (#548):
Previously if a task was cancelled while a subscription task was active,
theasyncio.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 requireFileVar
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 theTransportConnectionFailed
Exception
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
Misc
v4.0.0a0
Breaking Changes
- Set ssl=True by default for AIOHTTPTransport (#538) (issue #529)
- New
TransportConnectionClosed
Exception replacingConnectionClosed
Exception (#536) websocket
attribute removed from transport, now using_connected
instead (#536)- Upgrade lastest websockets and Exceptions overhaul (#543)
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
- Added new TransportConnectionClosed exception for clearer error handling
- Reorganized code with proper separation of concerns:
- Moved common functionality into dedicated adapters folder
- Isolated connection handling from transport business logic
- Separated ListenerQueue into its own file for better modularity
Misc
v3.5.3
v3.5.2
v3.5.1
3.5.1
Issue #529 reported that by default the AIOHTTPTransport
was not validating ssl certificates
(a self-certificate was accepted by default).
This version adds a warning to warn users (See PR #533).
As a workaround, using ssl=True
in the transport arguments fix the issue.
graphql-core
has been restricted to <3.2.4
to fix tests.
A new stable version will be made shortly.
v3.6.0b4
Warning
Issue #529 reported that by default the AIOHTTPTransport
was not validating ssl certificates
(a self-certificate was accepted by default).
This version adds a warning to warn users, in the PR:
- AIOHTTPTransport default ssl cert validation add warning (#530)
A new major version will be made shortly to change this default behavior to always verify
ssl certificates by default.
Features
- Use httpx with gql-cli if aiohttp is not available on auto (#528)
Fixes
- Using gql version of the get_introspection_query method (#523)
This would reset the change of graphql-core to increase the type recursion level from 7 to 9
in version graphql-core==3.3.0a7 and allow the possibility to change the introspection
query recursion level.
Misc
- Sort elements in node_tree method (#520)
- Fix test for introspection type recursion level change in graphql-core v3.3.0a7 (#521)
- Adding the input_value_deprecation argument to get_introspection_query_ast (#524)
- Remove Python 3.8 support (#525)
- Bump sphinx dev dependencies (#526)
- Bump httpx to min 0.27 (#531)
- Bump websockets to 13.x (#532)
v3.6.0b3
Features
Fixes
- Fix properly exiting the WebsocketsTransport when a connection_error is received during init (#486)
- Always close transport when an exception appears during the transport connect (#488)
- Fix ssl=None not supported on recent versions of aiohttp (#496)
- Websockets transport Fix long hang under certain network failures (#517)
Misc
- Bump mypy to 1.10 (#485)
- Remove Python 3.7 support (#489)
- Bump pytest-cov dev-dependency to 5.0.0 (#487)
- Remove Python 3.7 support - cleaning old code (#495)
- Update annotation for client.execute_batch, get_execution_result argu… (#483)
- Adding MIT License classifier (#498)
- Delete gql-checker folder (#502)
- Fix build wheel warnings (#503)
- Using unittest.mock instead of mock (#504)
- Using pyupgrade with --py38-plus (#505)
- Upgrade GitHub workflows (#506)
- Restrict permissions to GitHub actions (#509)
- types-mock was only useful when using old standalone "mock" module (#511)
- Fix python 3.11 test coverage issues (#512)
- Add minimal pyproject.toml (#514)
- Fix docs sphinx nitpick warnings - adding intersphinx_mapping (#515)
- Fix tests failing vcrpy urllib3 dep (#518)
- Support Python 3.13 (#519)
- Fix deploy to Pypi GitHub action
v3.6.0b2
Fixes
- Fix importing
DirectiveLocation
directly from graphql (#477)
Fix running gql with graphql-core 3.3.0a5
Misc
v3.6.0b1
v3.6.0b0
Same as stable version 3.5.0 but with graphql-core back to versions >= 3.3.0a3