Skip to content

Commit a96e94f

Browse files
authored
docs(graphql): disable the introspection query (#1792)
1 parent 752eff3 commit a96e94f

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

core/configuration.md

+4
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ api_platform:
147147
# Enabled by default with installed webonyx/graphql-php and Twig.
148148
enabled: false
149149

150+
introspection:
151+
# Enabled by default with installed webonyx/graphql-php.
152+
enabled: true
153+
150154
# The nesting separator used in the filter names.
151155
nesting_separator: _
152156

core/graphql.md

+14
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,20 @@ api_platform:
116116
# ...
117117
```
118118

119+
## Disabling the Introspection Query
120+
121+
For security reason, the introspection query should be disabled to not expose the GraphQL schema.
122+
123+
If you need to disable it, it can be done in the configuration:
124+
125+
```yaml
126+
# api/config/packages/api_platform.yaml
127+
api_platform:
128+
graphql:
129+
introspection: false
130+
# ...
131+
```
132+
119133
## Request with `application/graphql` Content-Type
120134

121135
If you wish to send a [POST request using the `application/graphql` Content-Type](https://graphql.org/learn/serving-over-http/#post-request),

0 commit comments

Comments
 (0)