GraphQL
8.x-4.x
8.x-4.x
  • README
  • Getting started
    • Installation
    • Creating schemas
  • Data Producers
    • Data Producers
    • Built-in producers
    • Custom producers
    • Composing producers
  • Queries
    • Queries
    • Nodes
    • Entity references
    • Menus
    • Routes
  • Mutations
    • Mutations
    • Validations
  • Advanced
    • Composable schemas
Powered by GitBook
On this page
  • Dependencies
  • Permissions
  • Creating a schema

Was this helpful?

  1. Getting started

Installation

PreviousREADMENextCreating schemas

Last updated 4 years ago

Was this helpful?

The module requires installation via composerin order to pull in the dependencies for the module to work, most notably the .

  1. Install the module by running composer require drupal/graphql:^4.

  2. Enable the GraphQL module in extensions.

  3. Login and navigate to /admin/config/graphql to create a new server.

  4. At this point you can either start with the "Example schema" provided by the graphql_examples module (see the Introduction section) or start right away making your own custom schema as we will describe in the following sections.

Dependencies

By installing the module with composer it will also install the necessary libraries and the automatically.

Permissions

At this point you can check the permissions added by the module in the permissions page at /admin/people/permissions. You can control who can perform arbitrary and persisted queries against graphql and also who can access the Voyager or the GraphiQL pages.

Creating a schema

Like mentioned in the the 4.x version of the module uses a schema first approach which requires you to first start by making a schema and then start implementing how to resolve each of the fields of your schema. In the next chapter we will look at how to create your own schema to start resolving fields and returning actual Data from Drupal using the module.

webonyx/graphql-php library
webonyx/graphql-php library
Typed Data module
Introduction