This module allows you to create and expose a GraphQL schema for Drupal. It fully supports the GraphQL specification and provides tools to build your custom schema, including a development interface.
This module lets you craft and expose a GraphQL schema for Drupal 10 and 11.
It is is built around webonyx/graphql-php. As such, it supports the full official GraphQL specification with all its features.
You can use this module as a foundation for building your own schema with lots of data producer plugins available and through custom code.
For ease of development, it includes the GraphiQL interface at /graphql/explorer.
Example implementation
Example modules: https://git.drupalcode.org/project/graphql/-/tree/5.x/examples
Resources
Documentation: https://drupal-graphql.gitbook.io/graphql/
Project homepage: https://www.drupal.org/project/graphql
Upgrading from 4.x to 5.x
GraphQL 5.x has the same architecture as 4.x, the main differences are small PHP type API breaks. Upgrading is recommended, check the release notes.
Old 3.x version
The 3.x version of this module is now in maintenance mode.
Differences to the 5.x and 4.x versions: the 3.x version automatically generates a GraphQL schema from Drupal entities and data structures. It exposes Drupal details over the GraphQL API. The 5.x version leaves the GraphQL schema design to the developer, which makes it easier to hide Drupal internal details. The 5.x version requires the developer to setup and map the GraphQL API schema.
Check out https://github.com/drupal-graphql/drupal-decoupled-app for a complete example of a fully decoupled React and GraphQL 3.x application.
Upgrading from 3.x to 5.x
We recommend upgrading from 3.x to 5.x to take advantage of the improvements made in the GraphQL module and the underlying GraphQL library. If you still require automatic generation of the schema then take a look at the GraphQL Compose or GraphQL Core Schema projects which have implemented automatic schema generation on top of the 5.x and 4.x GraphQL module.
Depends on
Dependencies of the latest stable release
Required by
15 tracked projects depend on this one
- GraphQL Compose 1,908 sites
- GraphQL Core Schema 503 sites
- GraphQL Metatag 468 sites
- GraphQL Extra Cache 292 sites
- GraphQL Export 125 sites
- GraphQL Focal Point 66 sites
- GraphQL Search API Query Extension 64 sites
- GraphQL Responsive Image 60 sites
- GraphQL Address 23 sites
- GraphQL Vertex AI 9 sites
- GraphQL Compose: Mutations 3 sites
- Svg Image GraphQL
- GraphQL Compose: File upload
- GraphQL Compose: Entity form modes
- GraphQL Compose: Debug
Activity
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 5.0.0 | Stable | 10–11 | Jun 7, 2026 | ||
| 5.0.0-rc1 | Pre-release | 10–11 | May 9, 2026 | ||
| 5.0.0-beta4 | Pre-release | 10–11 | Apr 29, 2026 | ||
| 8.x-4.14 | Stable | 10–11 | Apr 29, 2026 | ||
| 5.0.0-beta3 | Pre-release | 10–11 | Apr 26, 2026 | ||
| 8.x-3.9 | Stable | 9–11 | Apr 15, 2026 | ||
| 8.x-3.8 | Stable | 9–11 | Mar 3, 2026 | ||
| 5.0.0-beta2 | Pre-release | 10–11 | Feb 19, 2026 | ||
| 8.x-3.7 | Stable | 9–11 | Feb 12, 2026 | ||
| 5.0.0-beta1 | Pre-release | 10–11 | Sep 9, 2025 | ||
| 8.x-4.13 | Stable | 10–11 | Sep 9, 2025 | ||
| 5.0.0-alpha3 | Pre-release | 10–11 | Aug 17, 2025 | ||
| 5.0.0-alpha2 | Pre-release | 10–11 | Minor PHP type updates | Jul 10, 2025 | |
| 5.0.0-alpha1 | Pre-release | 10–11 | Apr 19, 2025 | ||
| 8.x-4.12 | Stable | 10–11 | Mar 28, 2025 | ||
| 8.x-4.11 | Stable | 10–11 | Mar 19, 2025 | ||
| 5.x-dev | Dev | 10–11 | Mar 15, 2025 | ||
| 8.x-4.10 | Stable | 10–11 | Dec 10, 2024 | ||
| 8.x-3.6 | Stable | 9–11 | Oct 31, 2024 | ||
| 8.x-3.5 | Stable | 9–11 | Drupal 11 compatibility for version 3.x | Oct 31, 2024 |