Skip to content

GraphQL

GraphQL is available in NodeHive through the Drupal GraphQL contrib module. This is not a NodeHive-specific feature — it uses Drupal’s standard GraphQL implementation.

Setup

The GraphQL module needs to be installed and configured separately:

Terminal window
composer require drupal/graphql
drush en graphql

After enabling, configure your GraphQL server at /admin/config/graphql.

When to use GraphQL

GraphQL can be a good fit when:

  • Your frontend team prefers GraphQL query syntax
  • You need fine-grained control over which fields are returned
  • You’re building with a framework that has strong GraphQL tooling (e.g. Apollo Client)

For most NodeHive projects, we recommend using JSON:API with the nodehive-js client instead, as it requires less setup and is more tightly integrated with Drupal core.

Further Reading