graphql-server
A library setting up a GraphQL server in a variety of frameworks
What it is and what it does
GraphQL-Server is a base library that wraps graphql-core to provide a standardized interface for executing GraphQL queries, mutations, and subscriptions across multiple Python web frameworks. It passes all GraphQL specification tests and supports synchronous execution, asynchronous views, file uploads, and WebSocket-based subscriptions. Rather than being a standalone server, it acts as a bridge—you use its core functions (execute, execute_sync, subscribe) within your chosen framework (Django, Flask, FastAPI, aiohttp, Sanic, Channels, Litestar, Quart, Chalice, WebOb, or ASGI) to handle GraphQL operations.
The package is intended for developers building GraphQL APIs on top of existing Python web infrastructure. It handles the protocol and execution details so you can focus on schema design and resolver logic. The library includes type hints and docstrings throughout, and the repository provides integration examples for each supported framework.
Use it for:
- Add GraphQL query execution to a FastAPI or Flask application without building the execution layer from scratch.
- Implement WebSocket-based GraphQL subscriptions in a Django or aiohttp application using the subscribe function.
- Handle file uploads in GraphQL mutations across multiple framework backends using the built-in Upload support.
- Migrate a GraphQL server from one framework to another by reusing the same graphql_server integration pattern.
- Build a custom GraphQL server on top of a framework not yet listed by using the public execute/execute_sync/subscribe functions as a blueprint.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
GraphQL-Server provides helper functions to execute GraphQL queries and subscriptions on top of graphql-core, designed to integrate with Python web frameworks like Django, Flask, FastAPI, and others.
Yes, if you are building a GraphQL API in Python and want a framework-agnostic execution layer. The low install friction, MIT license, and broad framework support make it a practical choice. The 362-day release gap warrants checking whether the project's maintenance pace matches your needs, but the stable classifier and zero known vulnerabilities suggest it is suitable for production use.
Install
graphql-server on PyPI
pip
pip install graphql-serveruv
uv add graphql-serverpoetry
poetry add graphql-serverInstalling graphql-server
Before you install
Low install friction; depends only on graphql-core. Maintenance status is aging—last release was 362 days ago, though the repository remains active and the package is marked Production/Stable.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.
Quickstart
pip install graphql-server
from graphql_server import execute_sync
from graphql import build_schema
schema = build_schema('type Query { hello: String }')
result = execute_sync(schema, '{ hello }')
Requires Python 3.9 or later; graphql-core must be installed as a runtime dependency.
Verify before relying
- Whether the 362-day gap since last release indicates active maintenance or dormancy relative to the project's typical release cadence.
- Performance characteristics and scalability limits for concurrent subscriptions or high-volume query execution.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — graphql-core |
| Maintenance | aging — 362 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 151,881/month — #10,918 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: graphql_server-3.0.0-py3-none-any.whl
Keywords: graphql, api, rest, starlette, async, fastapi, django, flask, litestar, sanic, channels, aiohttp, chalice, webob, pyright, mypy, codeflash
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
graphql-server-coreGraphQL-Server-Core provides base utilities and…
permissive · top 15,000 on PyPI
graphql-relayProvides Relay-compliant patterns for…
permissive · top 1,000 on PyPI
Flask-GraphQLAdds a GraphQL endpoint to Flask applications,…
permissive · top 15,000 on PyPI
graphql-coreGraphQL-core is a Python port of the GraphQL.js…
permissive · top 1,000 on PyPI
gqlA GraphQL client for Python that executes…
permissive · top 1,000 on PyPI
starlette-graphene3Mounts a GraphQL API built with Graphene v3…
permissive · top 15,000 on PyPI
strawberry-graphqlStrawberry GraphQL is a Python library for…
permissive · top 5,000 on PyPI
graphql-core-promiseAdds promise-based resolver and dataloader…
permissive · top 15,000 on PyPI
python-graphql-clientSends GraphQL queries, mutations, and…
permissive · top 15,000 on PyPI
ariadneAriadne is a Python library for building…
permissive · top 5,000 on PyPI