# webonyx/graphql-php

PHP implementation of the GraphQL specification based on the reference implementation in JavaScript

Repository: https://github.com/webonyx/graphql-php
Canonical: https://ross.abutalabs.com/products/graphql-php
Homepage: https://webonyx.github.io/graphql-php
Language: PHP
License: MIT
License Family: permissive
Topics: php, graphql, api, api-management, graphql-php, rest-replacement
Last push: 2026-08-25T13:05:17+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 86, longevity 100
- inputs: {"age_days": 4067, "days_push": 8, "days_rel": 19, "gap_med": 5, "n_releases_24m": 62}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4718, forks 575 (observed 2026-08-28T04:08:57.472967+00:00)

## What it is
A feature-complete PHP implementation of the GraphQL specification, based on the JavaScript reference implementation. It provides type system primitives, query parsing, validation, execution, and a standard HTTP server for building GraphQL APIs on top of existing business logic.

## Use cases
- build a graphql api in php
- replace a rest api with graphql
- parse and validate graphql queries
- serve graphql over http in php
- define a graphql type system for an existing app
- add graphql endpoint to a php framework

## When to choose
- you need a spec-compliant GraphQL server in PHP
- you want to expose existing business logic as a GraphQL API
- you need query validation, introspection, and rich error reporting
- you want framework-agnostic GraphQL primitives with optional integrations

## When to avoid
- you only need a simple REST API without GraphQL's query flexibility
- your project is not PHP-based
- you need a full framework with opinionated structure rather than a library

## Facets
- artifact type: library
- maturity: stable
- function: graphql, api-framework, http-server, parser, serialization
- domain: web-development, backend, apis, developer-tools
- platform: php, cross-platform
- tags: graphql-server, schema-definition, query-execution, spec-compliant, composer, web-server

## Member repositories
- webonyx/graphql-php (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:57.472967+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-29T18:19:06.736138+00:00, confidence not recorded.
  - readme: https://github.com/webonyx/graphql-php (fetched 2026-08-28T04:08:57.472967+00:00, sha 2112111731a6)
  - homepage: https://webonyx.github.io/graphql-php (fetched 2026-08-29T09:02:50.803650+00:00, sha 598cace27a00)
- Data as of 2026-08-30T08:39:29.467469+00:00.
