Skip to content

Extend

Extending and Configuring Drupal for web applications can be challenging at first and requires many adjustments. However, recipes simplify the process by offering a set of ready-to-install configurations to be applied to your installation.

Making Drupal ready to use as a headless CMS is not the exception, and for this reason, recipes are the best way to help you start your next Drupal decoupled implementation.

This guide shows how to install a Drupal decoupled recipe according to the recipes Initiative

We will follow as guide a setup using drupal/recommended-project as a template for illustration purposes.

Some modules of our recipes are still in active development; for this reason, changing the minimum-stability of composer is necessary to download all dependencies.

Terminal window
ddev composer config minimum-stability --merge --json "dev"

If you start a git repository of your project, you will find that the recipe is downloaded, and since this is managed by composer, you’ll want to exclude the /recipes path.

Terminal window
echo "/recipes" >> .gitignore
Terminal window
ddev composer require octahedroid/drupal-decoupled-graphql-basic-recipe^2

Recipes are applied using core’s PHP Drupal script. In your CLI, cd into your webroot, and run the following command:

Terminal window
ddev drush recipe ../recipes/drupal-decoupled-graphql-basic-recipe

Here is a set of recipes according to the recipes initiative, designed to configure Drupal as a headless CMS ready to be integrated with a Frontend application.