Skip to content

Commit 068554c

Browse files
authored
Add GraphQL endpoint when using SF Flex (#762)
1 parent 983c544 commit 068554c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

core/graphql.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ docker-compose exec php composer req webonyx/graphql-php && bin/console cache:cl
2020

2121
You can now use GraphQL at the endpoint: `https://localhost:8443/graphql`.
2222

23+
*Note:* If you used [Symfony Flex to install API Platform](../distribution/index.md#using-symfony-flex-and-composer-advanced-users),
24+
the GraphQL endpoint will be: `https://localhost:8443/api/graphql`.
25+
2326
## GraphiQL
2427

2528
If Twig is installed in your project, go to the GraphQL endpoint with your browser. You will see a nice interface provided by GraphiQL to interact with your API.

distribution/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ need to install the [graphql-php](https://webonyx.github.io/graphql-php/) librar
656656
docker-compose exec php composer req webonyx/graphql-php && docker-compose exec php bin/console cache:clear
657657
```
658658

659-
You now have a GraphQL API! Open `https://localhost:8443/graphql` to play with it using the nice [GraphiQL](https://github.com/graphql/graphiql)
659+
You now have a GraphQL API! Open `https://localhost:8443/graphql` (or `https://localhost:8443/api/graphql` if you used Symfony Flex to install API Platform) to play with it using the nice [GraphiQL](https://github.com/graphql/graphiql)
660660
UI that is shipped with API Platform:
661661

662662
![GraphQL endpoint](images/api-platform-2.2-graphql.png)

0 commit comments

Comments
 (0)