Skip to content

Commit c836ded

Browse files
committed
feat(next-drupal): setup graphql
1 parent ad4c0d2 commit c836ded

12 files changed

+244
-6
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"ddev:init": "./scripts/init-drupal.sh",
3434
"ddev:init:basic": "./scripts/init-drupal.sh --starter basic-starter",
3535
"ddev:init:pages": "./scripts/init-drupal.sh --starter pages-starter",
36+
"ddev:init:graphql": "./scripts/init-drupal.sh --starter graphql-starter",
3637
"ddev:destroy": "./scripts/destroy-drupal.sh"
3738
},
3839
"devDependencies": {

recipes/next_drupal_base/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
"require": {
1313
"drupal/next": "*"
1414
}
15-
}
15+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "drupal/next_drupal_graphql",
3+
"description": "Common dependencies and configuration for Next Drupal GraphQL projects.",
4+
"type": "drupal-recipe",
5+
"license": "GPL-2.0-or-later",
6+
"repositories": [
7+
{
8+
"type": "composer",
9+
"url": "https://packages.drupal.org/8"
10+
}
11+
],
12+
"require": {
13+
"drupal/next": "*",
14+
"drupal/graphql": "^4.6",
15+
"drupal/graphql_compose": "^2.0"
16+
}
17+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
uuid: 3954a200-86f3-499b-914e-99a6dac58861
2+
langcode: en
3+
status: true
4+
dependencies: { }
5+
name: graphql_schema
6+
label: 'Graphql Schema'
7+
endpoint: /graphql
8+
debug_flag: 0
9+
schema: graphql_compose
10+
caching: true
11+
batching: true
12+
disable_introspection: false
13+
query_depth: null
14+
query_complexity: null
15+
schema_configuration:
16+
graphql_compose:
17+
enabled: true
18+
persisted_queries_settings: { }
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
entity_config:
2+
node:
3+
article:
4+
enabled: true
5+
query_load_enabled: true
6+
edges_enabled: true
7+
routes_enabled: true
8+
page:
9+
enabled: true
10+
query_load_enabled: true
11+
edges_enabled: true
12+
routes_enabled: true
13+
taxonomy_term:
14+
tags:
15+
enabled: false
16+
user:
17+
user:
18+
enabled: true
19+
query_load_enabled: true
20+
edges_enabled: true
21+
routes_enabled: true
22+
field_config:
23+
node:
24+
article:
25+
body:
26+
enabled: true
27+
field_image:
28+
enabled: true
29+
field_tags:
30+
enabled: true
31+
page:
32+
body:
33+
enabled: true
34+
user:
35+
user:
36+
user_picture:
37+
enabled: true
38+
settings:
39+
exclude_unpublished: true
40+
expose_entity_ids: false
41+
field_required_override: false
42+
schema_description: "GraphQL Compose"
43+
schema_version: "1"
44+
simple_queries: true
45+
simple_unions: true
46+
site_name: false
47+
site_slogan: false
48+
site_front: true
49+
inflector_langcode: en
50+
inflector_singularize: true
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
uuid: a5900cb4-ec2f-4788-9e17-73ab49bfcb83
2+
langcode: en
3+
status: true
4+
dependencies:
5+
module:
6+
- node
7+
id: content
8+
label: Content
9+
type: 'canonical_entities:node'
10+
pattern: '[node:title]'
11+
selection_criteria:
12+
c0c92c0f-9ee6-4b53-8270-198bd024c071:
13+
id: 'entity_bundle:node'
14+
negate: false
15+
uuid: c0c92c0f-9ee6-4b53-8270-198bd024c071
16+
context_mapping:
17+
node: node
18+
bundles:
19+
article: article
20+
page: page
21+
selection_logic: and
22+
weight: -5
23+
relationships: { }
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
uuid: a5bd2fda-4983-4e8d-8019-1c2695b15a42
2+
langcode: en
3+
status: true
4+
dependencies: {}
5+
id: nextjs_site
6+
name: nextjs_site
7+
description: "Next.js Site"
8+
grant_types:
9+
refresh_token:
10+
status: false
11+
description: ""
12+
client_credentials:
13+
status: true
14+
description: ""
15+
authorization_code:
16+
status: false
17+
description: ""
18+
umbrella: false
19+
parent: _none
20+
granularity_id: role
21+
granularity_configuration:
22+
role: next_js_site
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
scope_provider: dynamic
2+
token_cron_batch_size: 0
3+
public_key: ../keys/public.key
4+
private_key: ../keys/private.key
5+
disable_openid_connect: false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
uuid: 9082be18-8b66-4bfa-8d54-e703ef2c7e2d
2+
langcode: en
3+
status: true
4+
dependencies: {}
5+
id: next_js_site
6+
label: "Next.js Site"
7+
weight: 4
8+
is_admin: false
9+
permissions:
10+
- "execute graphql_schema arbitrary graphql requests"
11+
- "execute graphql_schema persisted graphql requests"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "Next Drupal GraphQL"
2+
description: "Common dependencies and configuration for Next Drupal GraphQL projects"
3+
type: "Site"
4+
5+
install:
6+
- next
7+
- next_graphql
8+
- graphql
9+
- graphql_compose_edges
10+
- graphql_compose_routes
11+
- graphql_compose_users

0 commit comments

Comments
 (0)