@@ -16,11 +16,11 @@ To enable GraphQL and its IDE (GraphiQL and GraphQL Playground) in your API, sim
16
16
composer require api-platform/graphql
17
17
```
18
18
19
- You can now use GraphQL at the endpoint: ` https://localhost:8443 /graphql ` .
19
+ You can now use GraphQL at the endpoint: ` https://localhost/graphql ` .
20
20
21
21
> [ !NOTE]
22
22
> If you used [ the Symfony Variant thanks to Symfony Flex] ( ../symfony/index.md#installing-the-framework ) or the Laravel
23
- > variant, URLs will be prefixed with ` /api ` by default . For example, the GraphQL endpoint will be : ` https://localhost:8443/api /graphql ` .
23
+ > variant, the default GraphQL endpoint will be available at a relative URL like ` /graphql ` . For example: ` https://localhost/graphql ` .
24
24
25
25
## Changing Location of the GraphQL Endpoint
26
26
@@ -33,12 +33,12 @@ Using the Symfony variant we can do this modification by adding the following co
33
33
``` yaml
34
34
# api/config/routes.yaml
35
35
api_graphql_entrypoint :
36
- path : /api/ graphql
36
+ path : /graphql
37
37
controller : api_platform.graphql.action.entrypoint
38
38
# ...
39
39
```
40
40
41
- Change ` /api/ graphql ` to the URI you wish the GraphQL endpoint to be accessible on.
41
+ Change ` /graphql ` to the URI you wish the GraphQL endpoint to be accessible on.
42
42
43
43
### Laravel Routes
44
44
@@ -49,11 +49,11 @@ Using the Laravel variant we can do this modification by adding the following co
49
49
use Illuminate\Support\Facades\Route;
50
50
use ApiPlatform\GraphQL\Action\EntrypointAction;
51
51
52
- Route::post('/api/ graphql', EntrypointAction::class)
52
+ Route::post('/graphql', EntrypointAction::class)
53
53
->name('api_graphql_entrypoint');
54
54
```
55
55
56
- Change ` /api/ graphql ` to the URI you wish the GraphQL endpoint to be accessible on.
56
+ Change ` /graphql ` to the URI you wish the GraphQL endpoint to be accessible on.
57
57
58
58
## GraphiQL
59
59
0 commit comments