Skip to content

v4.0.0b0

Pre-release
Pre-release
Compare
Choose a tag to compare
@leszekhanusz leszekhanusz released this 28 May 16:08

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

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

  • Remove MIT license classifier (#555)
  • Refactor transports (#557)