Skip to content

Commit fe5fa31

Browse files
committed
docs: updates to GraphQL quick start
1 parent d2cfd18 commit fe5fa31

File tree

3 files changed

+28
-12
lines changed

3 files changed

+28
-12
lines changed

www/content/tutorials/draft-mode/create-oauth-client.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ openssl rsa -in private.key -pubout > public.key
8181

8282
---
8383

84-
## 5. Create Scopes
84+
## 5. Create Scope
8585

8686
1. Visit _/admin/config/people/simple_oauth/oauth2_scope/dynamic/add_
8787
2. Fill in the following values:
@@ -102,7 +102,7 @@ openssl rsa -in private.key -pubout > public.key
102102
2. Fill in the following values:
103103

104104
- **Label**: `Next.js site`
105-
- **Client ID**: `nextjs_site` (or generate a UUID is preferred)
105+
- **Client ID**: `nextjs_site` (or generate a UUID if preferred)
106106
- **Secret**: `Your secret`
107107
- **Grant Types**: `Client Credentials`
108108
- **Scopes**: `nextjs_site`
@@ -114,7 +114,7 @@ _Important: note the client id (uuid) and the secret. These are going to be used
114114

115115
---
116116

117-
## 6. Connect Drupal
117+
## 7. Connect Drupal
118118

119119
To connect the Next.js project to Drupal, we use [environment variables](https://nextjs.org/docs/basic-features/environment-variables).
120120

@@ -128,7 +128,7 @@ DRUPAL_CLIENT_SECRET=
128128

129129
---
130130

131-
## 7. Update NextDrupal client.
131+
## 8. Update NextDrupal client.
132132

133133
Update the `NextDrupal` client to use the **Bearer** authentication header.
134134

www/content/tutorials/graphql/configure-authentication.mdx

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,33 @@ openssl rsa -in private.key -pubout > public.key
5454

5555
---
5656

57-
## 5. Create Consumer
57+
## 5. Create Scope
58+
59+
1. Visit _/admin/config/people/simple_oauth/oauth2_scope/dynamic/add_
60+
2. Fill in the following values:
61+
62+
- **Machine-readable Name**: `nextjs_site`
63+
- **Description**: `Next.js Site`
64+
- **Grant Types**: `Client Credentials`
65+
- **Granularity**: `Role`
66+
- **Role**: `Next.js Site`
67+
68+
3. Click **Save**
69+
70+
---
71+
72+
## 6. Create Consumer
5873

5974
1. Visit _/admin/config/services/consumer/add_
6075
2. Fill in the following values:
6176

6277
- **Label**: `Next.js site`
63-
- **Client ID**: `nextjs_site`
64-
- **User**: `Select the user we created`
78+
- **Client ID**: `nextjs_site` (or generate a UUID if preferred)
6579
- **Secret**: `Your secret`
66-
- **Grant Types**: `Select 'Client Credentials'`
67-
- **Scopes**: `Select the role we created`
80+
- **Grant Types**: `Client Credentials`
81+
- **Scopes**: `nextjs_site`
82+
- **User**: `Select the user we created`
6883

6984
3. Click **Save**
7085

71-
_Important: note the client id and the secret. These are going to be used as environment variables for the Next.js site._
86+
_Important: note the client id (uuid) and the secret. These are going to be used as environment variables for the Next.js site._

www/content/tutorials/graphql/enable-modules.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ group: Quick Start (GraphQL)
66
---
77

88
1. Visit `/admin/modules`.
9-
2. Enable the following modules: **Next.js**, **Next.js GraphQL**, **GraphQL Compose: Edges**, **GraphQL Compose: Routes**.
9+
2. Enable the following modules: **Next.js**, **Next.js GraphQL**, **GraphQL Compose: Edges**, **GraphQL Compose: Routes**, **GraphQL Compose: Users**.
1010

1111
## Configure GraphQL Compose
1212

1313
1. Visit `/admin/config/graphql_compose`.
14-
2. Enable "GraphQL", "Single Query", "Edge Query", & "Loading by Route" for the Article content type.
14+
2. Under the Content tab, enable "GraphQL", "Single Query", "Edge Query", & "Loading by Route" for the Article content type.
1515
3. Enable all of the fields for the Article content type.
1616
4. Do the same for the Basic page content type.
17+
5. Under the Users tab, do the same for the user entity.
1718

1819
## Try GraphQL
1920

0 commit comments

Comments
 (0)