Registry / devops / graphql-core-promise

graphql-core-promise

JSON →
library3.4.2pypypi✓ verified 79d ago

Adds promise-based dataloader and resolver support to graphql-core v3+ by patching middlewares and execution. Current version 3.4.2, requires Python >=3.10, maintained on GitHub by fellowapp.

pip install graphql-core-promise
INSTALL
IMPORT
SIG · GRAPHQL-CORE-PROMI
G
graphql-core-promise
devopspythonv3.4.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PromiseExecutionContext
from graphql_core_promise import PromiseExecutionContext
from graphql_core_promise import PromiseMiddleware
execute
from graphql_core_promise import execute

Minimal example demonstrating promise-based resolver with graphql-core.

import asyncio from graphql import graphql_sync, build_schema from graphql_core_promise import promise_resolver schema = build_schema(''' type Query { hello: String } ''') async def resolve_hello(root, info): await asyncio.sleep(0.01) return 'Hello, world!' # Use promise_resolver middleware result = graphql_sync(schema, '{ hello }', middleware=[promise_resolver]) print(result.data)
Debug
Known issues
breakingVersion 3.0+ renamed the package and dropped Python 3.7/3.8 support. The old package `graphql-core-promise` was a different project; this is a fork by fellowapp with a breaking change to import paths.
fix
Update imports from `graphql_core.promise` to `graphql_core_promise`.
affects: >=3.0.0
gotchaPromiseMiddleware expects middleware context to be dict-like. Passing a custom object without `__getitem__` and `__setitem__` or using non-dict middleware chain may cause AttributeError.
fix
Ensure middleware list elements support dict-like access, or use plain dicts.
affects: all
Upgrade
Version history
3.4.2latest on PyPI · released Mar 7, 2025
Audit
Dependencies
graphql-corerequiredPeer dependency; core library
Agent activity
8 hits · last 30 days
node
8
Resources
graphql-core-promise — pip install graphql-core-promise · libregistry