Flask-GraphQL
Adds GraphQL support to your Flask application
What it is and what it does
Flask-GraphQL is a lightweight integration layer that mounts a GraphQL endpoint into a Flask application. It wraps the GraphQLView class, which you register as a Flask route to handle GraphQL queries against a schema you provide. The package also optionally serves GraphiQL, a browser-based IDE for exploring and testing your GraphQL API.
The package supports batch query execution, custom context and root values, pretty-printed responses, and custom executors. You can subclass GraphQLView to implement dynamic behavior per request. However, the project has been abandoned since late 2019 with no maintenance activity, and it declares no explicit runtime dependencies, making compatibility with current Flask and GraphQL library versions uncertain.
Use it for:
- Add a GraphQL endpoint to an existing Flask REST API without rewriting your application structure.
- Serve GraphiQL in development to let frontend developers explore and test your GraphQL schema interactively.
- Implement batch query support for Apollo Client or similar frameworks that benefit from query batching.
- Migrate from REST to GraphQL incrementally by running both REST and GraphQL endpoints on the same Flask app.
- Customize GraphQL execution behavior per request by subclassing GraphQLView and overriding get_root_value.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds a GraphQL endpoint to Flask applications, allowing you to serve GraphQL queries alongside your existing Flask routes with optional GraphiQL browser interface for testing.
No, unless you are maintaining legacy code already using this package. The project is abandoned (last release 2019, no commits since 2023) with no declared runtime dependencies, making compatibility with current Flask and graphql-core versions uncertain. For new projects, use an actively maintained alternative.
Install
flask-graphql on PyPI
pip
pip install flask-graphqluv
uv add flask-graphqlpoetry
poetry add flask-graphqlInstalling Flask-GraphQL
Before you install
Installation friction is high; the package has been abandoned since 2019 with no updates for over 2444 days. The last commit was 2023-01-03, but the project is no longer actively maintained. Consider whether you need ongoing support or security updates before adopting.
License in practice
MIT license is permissive and imposes no significant restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
from flask_graphql import GraphQLView
app.add_url_rule('/graphql', view_func=GraphQLView.as_view('graphql', schema=schema, graphiql=True))
You must have a GraphQL schema object already defined and Flask installed; the package itself declares no runtime dependencies.
Verify before relying
- Whether this package works with current versions of Flask and graphql-core (no runtime dependencies declared, compatibility unclear).
- Whether the package supports modern Python versions beyond those listed in classifiers (3.7 was the latest listed).
- Security implications of using abandoned software in production environments.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,444 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 690,027/month — #5,334 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: Flask-GraphQL-2.0.1.tar.gz
Keywords: api, graphql, protocol, rest, flask
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
graphene-file-uploadAdds file upload support to GraphQL mutations…
permissive · top 15,000 on PyPI
graphql-serverGraphQL-Server provides helper functions to…
permissive · top 15,000 on PyPI
graphql-server-coreGraphQL-Server-Core provides base utilities and…
permissive · top 15,000 on PyPI
gqlA GraphQL client for Python that executes…
permissive · top 1,000 on PyPI
strawberry-graphqlStrawberry GraphQL is a Python library for…
permissive · top 5,000 on PyPI
graphqlclientA lightweight GraphQL client that sends queries…
permissive · top 15,000 on PyPI
python-graphql-clientSends GraphQL queries, mutations, and…
permissive · top 15,000 on PyPI
django-graphiql-debug-toolbarIntegrates Django Debug Toolbar into the…
permissive · top 15,000 on PyPI
graphql-coreGraphQL-core is a Python port of the GraphQL.js…
permissive · top 1,000 on PyPI
sgqlcsgqlc is a Python client library for querying…
permissive · top 5,000 on PyPI