Drupal
Using this starter, you'll explore a ready-to-use Drupal GraphQL Project preloaded with content, a GraphQL server and a simple OAuth configuration.
Requirements
DDEV >= 1.23.3
or
Lando >= 3.0.0
Installing Drupal
- DDEV
- Lando
mkdir drupal-decoupled && cd drupal-decoupled
ddev config --project-type=drupal --php-version=8.3 --docroot=web
ddev start
ddev composer create octahedroid/drupal-decoupled-project:^10
ddev config --update
ddev install
mkdir drupal-decoupled && cd drupal-decoupled
lando init --source cwd --recipe drupal10 --webroot=web --name=drupal-decoupled -y
lando composer create octahedroid/drupal-decoupled-project:^10 tmp && cp -r tmp/. . && rm -rf tmp
lando start
lando install
Configuring Simple OAuth Settings
-
You can use the previously generated
DRUPAL_CLIENT_ID
andDRUPAL_CLIENT_SECRET
values shown on the CLI or as a warning message. -
You can reuse the previously generated Consumers at the site by visiting
admin/config/services/consumer
to edit the consumers labeled asViewer
&Previewer
and assigning them a new secret value.
If you prefer you can created new Consumers is this case, make sure you assign the editor
user and the proper scope of Viewer
& Previewer
depending on the usage you are planing to give to each one.
Make sure you remember the values used as secret on each Consumer because you will need them as env variables for the front end configuration.
More info about it at this blog post Implementing Content Previews with Drupal and Remix