# Graphene

GraphQL framework for Python

Repository: https://github.com/graphql-python/graphene
Canonical: https://ross.abutalabs.com/products/graphene
Homepage: http://graphene-python.org/
Language: Python
License: MIT
License Family: permissive
Topics: graphql, python, relay, framework, graphene
Last push: 2025-09-04T15:43:44+00:00
Link (homepage): http://graphene-python.org/
Link (site_page): https://docs.graphene-python.org/
Link (site_page): https://docs.graphene-python.org/en/latest/quickstart

## Health v2 (maintenance only)
Score: 52/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 40, release rhythm 40, longevity 100
- inputs: {"age_days": 3996, "days_push": 363, "days_rel": 662, "gap_med": 9, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8239, forks 819 (observed 2026-08-28T04:10:19.788973+00:00)

## What it is
Graphene is a code-first Python library for building GraphQL schemas and APIs, with built-in Relay support and integrations for Django, SQLAlchemy, Mongo, Flask, and other frameworks. It lets developers define types and resolvers in Python code rather than SDL, producing spec-compliant schemas usable with clients like Relay, Apollo, and gql.

## Use cases
- build a graphql api in python
- add graphql support to a django app
- create relay-compliant graphql schemas
- expose sqlalchemy models over graphql
- replace a rest api with graphql
- define graphql types with python code
- serve graphql from flask

## When to choose
- you prefer a code-first approach over writing SDL
- you use Django, SQLAlchemy, or Mongo and want ORM integration
- you need Relay spec support like connections and mutations
- you want a mature, widely adopted Python GraphQL library

## When to avoid
- you prefer schema-first development with SDL files
- you want a newer library with async-first design like Strawberry
- your project is not Python-based

## Facets
- artifact type: library
- maturity: stable
- function: graphql, api-framework, web-framework
- domain: web-development, backend, apis
- platform: python, cross-platform
- tags: code-first, relay, django-integration, sqlalchemy, flask

## Member repositories
- graphql-python/graphene (main) score 52
- graphql-python/graphene-django (plugin) score 63
- graphql-python/flask-graphql (plugin) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:19.788973+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:29:29.660938+00:00, confidence not recorded.
  - readme: https://github.com/graphql-python/graphene (fetched 2026-08-28T04:10:19.788973+00:00, sha d91bd9aff9fe)
  - homepage: http://graphene-python.org/ (fetched 2026-08-29T08:28:05.296659+00:00, sha da097c9cf6ca)
  - site_page: https://docs.graphene-python.org/ (fetched 2026-08-29T08:28:05.305769+00:00, sha 95deb50893a6)
  - site_page: https://docs.graphene-python.org/en/latest/quickstart (fetched 2026-08-29T08:28:05.307962+00:00, sha 9317d8354dea)
  - registry_pypi: https://pypi.org/pypi/graphene/json (fetched 2026-08-29T08:28:05.310280+00:00, sha 367fd9a9c9bd)
  - registry_pypi: https://pypi.org/pypi/graphene-django/json (fetched 2026-08-29T08:28:05.312035+00:00, sha 3b8b0077cba3)
  - registry_pypi: https://pypi.org/pypi/flask-graphql/json (fetched 2026-08-29T08:28:05.313637+00:00, sha f6815b23076b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
