Skip to content

GraphQL: use the default port #545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions core/graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ Once enabled, you have nothing to do: your schema describing your API is automat

To enable GraphQL and GraphiQL interface in your API, simply require the [graphql-php](https://webonyx.github.io/graphql-php/) package using Composer and clear the cache one more time:

$ composer require webonyx/graphql-php && bin/console cache:clear
```bash
docker-compose exec php composer req webonyx/graphql-php && bin/console cache:clear
```

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

## GraphiQL

Expand Down
4 changes: 3 additions & 1 deletion distribution/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,9 @@ ISBN isn't valid...
Isn't API Platform a REST **and** GraphQL framework? That's true! GraphQL support isn't enabled by default, to add it we
need to install the [graphql-php](https://webonyx.github.io/graphql-php/) library. Run the following command (the cache needs to be cleared twice):

$ docker-compose exec php composer req webonyx/graphql-php && bin/console cache:clear
```bash
docker-compose exec php composer req webonyx/graphql-php && bin/console cache:clear
```

You now have a GraphQL API! Open `https://localhost:8443/graphql` to play with it using the nice [GraphiQL](https://github.com/graphql/graphiql)
UI that is shipped with API Platform:
Expand Down