Skip to main content

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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for graphql-core-promise 3.4.0
File Size Uploaded
graphql_core_promise-3.4.0.tar.gz 11.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for graphql-core-promise 3.4.0
File Interpreter ABI Platform
graphql_core_promise-3.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.3 kB

Release files / graphql_core_promise-3.4.0.tar.gz

Download URL graphql_core_promise-3.4.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ff52a4437def3b0f822da9cce67adecb9e8f7e543a3b78a79e16cb436b6e47a1
BLAKE2b-256 checksum
How to use checksums
1e60078def376197a5de737769e0f9e299e79db55ae0a7c6818732c4360b3907
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 24, 2025.

Transparency log

Release files / graphql_core_promise-3.4.0-py3-none-any.whl

Download URL graphql_core_promise-3.4.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5d6a80df6347aedfdf28f29d14233db6660738d172774f6b2c950020edbb0ee
BLAKE2b-256 checksum
How to use checksums
21f8e8796bb5397eaed12cc929ef3a457fe4766bb5abbef8a860bf0717c72d3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 24, 2025.

Transparency log

Release history Release notifications | RSS feed

3.4.2

2 release files

3.4.1

2 release files

This release

3.4.0 This release

2 release files

3.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page