Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphql_core_promise_inofficial-3.3.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file graphql_core_promise_inofficial-3.3.1.tar.gz.

File metadata

File hashes

Hashes for graphql_core_promise_inofficial-3.3.1.tar.gz
Algorithm Hash digest
SHA256 18b5da1dbdee723c9bcca539939dbe8bde6bc856c2b966fcd7714217e176b244
MD5 aec397a2041ffec6db54bd3b0a6d1789
BLAKE2b-256 f8d179834324b80a02186f0930245af9ecbb8e5419bb734e6e83be3d3c630d26

See more details on using hashes here.

File details

Details for the file graphql_core_promise_inofficial-3.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for graphql_core_promise_inofficial-3.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b083597b777b7691a03bfe41d4756750464d4cb04df6f8f0cca3eade05d61d36
MD5 fb42fb336641778c6c4f8706bab6819e
BLAKE2b-256 f12e0e356aed792e3a8334a78af6aab69617a7a7c25cc178fd41c61ef5808af6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page