diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 58339489e54b7048d5dd0649869ba0ae1e09b5dd..968970b5f1008cadfdda184748c2d44e7d46bdb8 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -13,6 +13,8 @@ * [🔑 Authentication](for-developers/gateway/authentication.md) * [👥 Users](for-developers/gateway/users.md) * [🗃 Static files](for-developers/gateway/static-files.md) + * [🧙♂ GraphQL](for-developers/gateway/graphql/README.md) + * [Decorators](for-developers/gateway/graphql/decorators.md) * [📠Cache](for-developers/gateway/cache.md) * [🔌 Connectors](for-developers/connector/README.md) * [Create a connector](for-developers/gateway/connector/create-a-connector.md) diff --git a/docs/for-developers/configuration/gateway.md b/docs/for-developers/configuration/gateway.md index d38ab154e55f1e150760153a28f33425d5df9811..032c822294962594fa5fc5b1820899be9b93e740 100644 --- a/docs/for-developers/configuration/gateway.md +++ b/docs/for-developers/configuration/gateway.md @@ -22,14 +22,16 @@ description: >- #### Authentication -| name | type | default | description | -| ----------------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| AUTH\_SKIP | boolean | false | Allow to skip authentication. Warn: all routes will be accessible without authentication. | -| AUTH\_JWT\_SECRET | string | N/A | Secret that should be used to generate JWT token | -| AUTH\_JWT\_TOKEN\_EXPIRES\_IN | string | '2d' | <p>JWT token time to live.</p><p>Expressed in seconds or a string describing a time span <a href="https://github.com/vercel/ms">vercel/ms</a></p> | -| AUTH\_COOKIE\_SAME\_SITE | string | 'strict' | Specify the cookie same site option. Value can be `lax`, `strict` or `none` | -| AUTH\_COOKIE\_SECURE | boolean | true | Specify the cookie secure option. Should be set to true if same site is not set to `strict`. | -| AUTH\_ENABLE\_SSO | boolean | false | Enable SSO login process, this variable will be provided to the frontend in order to perform the login. | +| name | type | default | description | +| -------------------------------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| AUTH\_SKIP | boolean | false | Allow to skip authentication. Warn: all routes will be accessible without authentication. | +| AUTH\_JWT\_SECRET | string | N/A | Secret that should be used to generate JWT | +| AUTH\_JWT\_REFRESH\_SECRET | string | N/A | Secret that should be used to generate Refresh Token | +| AUTH\_JWT\_TOKEN\_EXPIRES\_IN | string | '1h' | <p>JWT time to live.</p><p>Expressed in seconds or a string describing a time span <a href="https://github.com/vercel/ms">vercel/ms</a></p> | +| AUTH\_JWT\_REFRESH\_TOKEN\_EXPIRES\_IN | | '2d' | <p>Refresh token time to live.</p><p>Expressed in seconds or a string describing a time span <a href="https://github.com/vercel/ms">vercel/ms</a></p> | +| AUTH\_COOKIE\_SAME\_SITE | string | 'strict' | Specify the cookie same site option. Value can be `lax`, `strict` or `none` | +| AUTH\_COOKIE\_SECURE | boolean | true | Specify the cookie secure option. Should be set to true if same site is not set to `strict`. | +| AUTH\_ENABLE\_SSO | boolean | false | Enable SSO login process, this variable will be provided to the frontend in order to perform the login. | #### Database diff --git a/docs/for-developers/gateway/graphql/README.md b/docs/for-developers/gateway/graphql/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9d5694c90593b8a3e23d549f9de5ca8e798bf90a --- /dev/null +++ b/docs/for-developers/gateway/graphql/README.md @@ -0,0 +1,2 @@ +# 🧙♂ GraphQL + diff --git a/docs/for-developers/gateway/graphql/decorators.md b/docs/for-developers/gateway/graphql/decorators.md new file mode 100644 index 0000000000000000000000000000000000000000..440d4c45285ace4293da52e0e1dbf5e337b8241d --- /dev/null +++ b/docs/for-developers/gateway/graphql/decorators.md @@ -0,0 +1,6 @@ +# Decorators + +The request and the response made by `GraphQL` are a bit different then what you should expect from a normal REST API. For this purpose and as this is something that is often used, two decorators have been implemented to inject the request with the `@GQLRequest`, the response with `@GQLResponse` or the user with the `@CurrentUser`.  + +These 3 decorators can only be use in a GraphQL context, it will fail if it's a standard API REST request. +