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.4.2
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.4.2.tar.gz | 9.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| graphql_core_promise-3.4.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.0 kB
Release files / graphql_core_promise-3.4.2.tar.gz
| Download URL | graphql_core_promise-3.4.2.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
350b5b939832273f7459a1f178046dea28444adb6e983da38eb8b26587e542d6
|
|
BLAKE2b-256 checksum How to use checksums |
f95b95f0be191697fd7830116e8f651b57381b19d01bba194bf643e1f4f8a9cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.6.5
|
Release files / graphql_core_promise-3.4.2-py3-none-any.whl
| Download URL | graphql_core_promise-3.4.2-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1283b9dd5c48f71769cb0c5713755d3ccabed3fa18d3f789ffa17afa03239726
|
|
BLAKE2b-256 checksum How to use checksums |
56d79fad0b4b8362c550d64a760772dbf5d77a8a5d361ab09f43ae3510a97f70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.6.5
|