Inofficial fork of graphql-core-promise with a bugfix
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graphql_core_promise_inofficial-3.3.1.tar.gz.
File metadata
- Download URL: graphql_core_promise_inofficial-3.3.1.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18b5da1dbdee723c9bcca539939dbe8bde6bc856c2b966fcd7714217e176b244
|
|
| MD5 |
aec397a2041ffec6db54bd3b0a6d1789
|
|
| BLAKE2b-256 |
f8d179834324b80a02186f0930245af9ecbb8e5419bb734e6e83be3d3c630d26
|
File details
Details for the file graphql_core_promise_inofficial-3.3.1-py3-none-any.whl.
File metadata
- Download URL: graphql_core_promise_inofficial-3.3.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b083597b777b7691a03bfe41d4756750464d4cb04df6f8f0cca3eade05d61d36
|
|
| MD5 |
fb42fb336641778c6c4f8706bab6819e
|
|
| BLAKE2b-256 |
f12e0e356aed792e3a8334a78af6aab69617a7a7c25cc178fd41c61ef5808af6
|