skillfed

graphql-core-promise

Add support for promise-based dataloaders and resolvers to graphql-core v3+

graphql-core-promise v3.4.2 134.4K downloads/30d#11,476 on PyPI18
Permissive license BSD-3-Clause AGING released

What it is and what it does

graphql-core-promise bridges the gap between promise-based patterns (common in graphene 2 and JavaScript GraphQL libraries) and graphql-core v3+, which defaults to asyncio. It provides a drop-in ExecutionContext replacement that translates asyncio code into promise-based equivalents, allowing existing dataloaders and resolvers written for promise patterns to work without rewriting.

The package is particularly useful for teams migrating from graphene 2 to graphene 3 who have invested in promise-based resolver logic and want to avoid a full asyncio refactor. It integrates cleanly with graphene-django by accepting an execution_context_class argument, making it a minimal integration point rather than a wholesale architecture change.

Use it for:

  • Migrate graphene 2 projects to graphene 3 without rewriting all promise-based dataloaders and resolvers.
  • Use promise-based patterns in graphql-core v3+ when your team is more familiar with promise semantics than asyncio.
  • Integrate graphql-core-promise with graphene-django by passing PromiseExecutionContext to GraphQLView.
  • Maintain backward compatibility with existing promise-based GraphQL resolver libraries during a major version upgrade.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds promise-based resolver and dataloader support to graphql-core v3+, enabling synchronous promise patterns as an alternative to asyncio for GraphQL execution.

Yes, if you are migrating from graphene 2 to graphene 3 and have significant promise-based resolver code you want to preserve without rewriting. The low install friction and permissive license make it a practical bridge. However, the aging maintenance status (525 days since last release) means you should verify compatibility with your target graphql-core version and be prepared to maintain a fork if upstream support lapses.

Install

graphql-core-promise on PyPI

pip

pip install graphql-core-promise

uv

uv add graphql-core-promise

poetry

poetry add graphql-core-promise

Installing graphql-core-promise

Before you install

Low install friction; pure Python wheel with only two runtime dependencies (graphql-core and promise). Maintenance status is aging—last release was 525 days ago, though the repository remains active with a recent commit on 2025-03-07 and no archival.

License in practice

BSD-3-Clause (permissive) allows commercial and private use with minimal restrictions; you must include a copy of the license and disclaimer.

Quickstart

from graphql_core_promise import PromiseExecutionContext
from graphql.execution.execute import execute

execute(schema=schema, document=document, execution_context_class=PromiseExecutionContext)

Requires graphql-core v3+ and Python 3.10 or later; graphene-django 3 if used with Django.

Verify before relying

  • Whether promise-based execution offers performance or compatibility advantages over asyncio in typical workloads.
  • Current compatibility status with graphql-core versions released after the last update (525 days ago).
  • Whether the package is actively maintained or in maintenance-only mode given the aging release cycle.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — graphql-core, promise
Maintenance aging — 525 days since the last release
Last repo commit
First released
Downloads 134,378/month — #11,476 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: graphql_core_promise-3.4.2-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

promise-based graphql resolversgraphql-core promise supportpromise dataloaders graphqlgraphql execution context promisemigrate graphene 2 to 3synchronous promise graphql
graphql-executionpromise-patternsmigration-aid

More Python Modules packages