Graphql core promise
Add support for promise-based dataloaders and resolvers to graphql-core v3+. This aims to make migrating to graphene 3 and graphql-core 3 easier for existing projects.
Usage
This package provides an ExecuteContext that can be used as a drop-in replacement for the default one.
from graphql_core_promise import PromiseExecutionContext
from graphql.execution.execute import execute
execute(schema=..., document=..., execution_context_class=PromiseExecutionContext)
With Django
graphene-django's GraphqlView accepts a execution_context_class argument in the constructor. Or you can specify it as a class variable when subclassing.
For example:
view = GraphQLView.as_view(execution_context_class=PromiseExecutionContext)
# OR
class MyGraphQLView(GraphQLView):
execution_context_class = PromiseExecutionContext
Note that this project requires graphene-django 3, which is not fully compatible with graphene-django 2.
How it works
This packages is done by translating the asyncio code in the default ExecuteContext into promise based code.
Metadata
Release files for graphql-core-promise 3.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| graphql_core_promise-3.3.0.tar.gz | 10.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| graphql_core_promise-3.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.1 kB
Release files / graphql_core_promise-3.3.0.tar.gz
| Download URL | graphql_core_promise-3.3.0.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e4ec6b638d0723dc5bb1d86f33feed581e6be1170be3de58b53f4cbe267e676
|
|
BLAKE2b-256 checksum How to use checksums |
38fadb0ed046ebe21afbc40259e6e87764ed2a4aee25f7dc69a4ca20024b5aee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / graphql_core_promise-3.3.0-py3-none-any.whl
| Download URL | graphql_core_promise-3.3.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bfa8aa64440fa2e1938fb0085b362c80ba3d09ebfbcf5c27a6ed92beec7797ff
|
|
BLAKE2b-256 checksum How to use checksums |
23a562b373740148ef6949d1256778c0445fbbb280f5a5e9b99383d29ba709c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|