mirror of
https://github.com/wassname/talk.git
synced 2026-07-27 11:28:12 +08:00
Docs update- Jul 2020 (#3056)
* added existing closing stories behavior * updated find your embed * updated sso docs * updated graphiql section * clarified A user, not all the users * clarified manual override on open/close stories * clarified uniqueness constraints on sso Co-authored-by: jessie.rushing <jessie.rushing@voxmedia.com>
This commit is contained in:
@@ -3,9 +3,21 @@ title: GraphQL API Overview
|
||||
permalink: /v5/api/overview/
|
||||
---
|
||||
|
||||
## GraphQL API
|
||||
|
||||
Our API is generally served via GraphQL at `/api/graphql` on your Coral installation. If you're running Coral locally, this would be https://localhost:8080/api/graphql.
|
||||
|
||||
You can enable the GraphiQL interface at https://localhost:3000/graphiql (Note the port number here is not 8080, this is because this route is directly served by the server, and not the webpack development server) when running in development to access a GraphQL playground to use with documentation provided in the sidebar on what edges are available to you. You can do this by setting `ENABLE_GRAPHIQL=true`. **(🚨 Note 🚨) we do not recommend using this in production environments as it disables many safety features used by the application**.
|
||||
## Enabling & Using `/graphiql`
|
||||
|
||||
It is not required to enable the `/graphiql` playground to use Coral’s GraphQL API. The playground simply provides an easy way to explore and interact with Coral’s GraphQL schema. You can enable the GraphiQL interface at https://localhost:3000/graphiql (Note the port number here is not 8080, this is because this route is directly served by the server, and not the webpack development server) when running in development. You can do this by setting `ENABLE_GRAPHIQL=true`.
|
||||
|
||||
**(🚨 Note 🚨) we do not recommend using this in production environments as it disables many safety features used by the application**.
|
||||
|
||||
When submitting requests in the `/graphiql` playground, it is necessary to include an ADMIN level bearer token to authenticate your requests. When signed into Coral as an ADMIN level user, you can grab your current access token from your browser’s local storage. Add the following to the HTTP Headers section of your GraphiQL call.
|
||||
```sh
|
||||
{“authorization”:”Bearer <token>”}
|
||||
```
|
||||
|
||||
|
||||
## Making your first request
|
||||
|
||||
|
||||
Reference in New Issue
Block a user