diff --git a/src/lib/stores/querySubscription/README.md b/src/lib/stores/querySubscription/README.md index 0d0e660..d75ff19 100644 --- a/src/lib/stores/querySubscription/README.md +++ b/src/lib/stores/querySubscription/README.md @@ -9,6 +9,7 @@ Live updates are great both to get instant previews of your content while editin +- [Table of Contents](#table-of-contents) - [Reference](#reference) - [Initialization options](#initialization-options) - [Connection status](#connection-status) @@ -29,19 +30,23 @@ const subscription = querySubscription(options: Options); ## Initialization options -| prop | type | required | description | default | -| ------------------ | ------------------------------------------------------------------------------------------ | ------------------ | ------------------------------------------------------------------ | ------------------------------------ | -| enabled | boolean | :x: | Whether the subscription has to be performed or not | true | -| query | string \| [`TypedDocumentNode`](https://github.com/dotansimha/graphql-typed-document-node) | :white_check_mark: | The GraphQL query to subscribe | | -| token | string | :white_check_mark: | DatoCMS API token to use | | -| variables | Object | :x: | GraphQL variables for the query | | -| preview | boolean | :x: | If true, the Content Delivery API with draft content will be used | false | -| environment | string | :x: | The name of the DatoCMS environment where to perform the query | defaults to primary environment | -| initialData | Object | :x: | The initial data to use on the first render | | -| reconnectionPeriod | number | :x: | In case of network errors, the period (in ms) to wait to reconnect | 1000 | -| fetcher | a [fetch-like function](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) | :x: | The fetch function to use to perform the registration query | window.fetch | -| eventSourceClass | an [EventSource-like](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) class | :x: | The EventSource class to use to open up the SSE connection | window.EventSource | -| baseUrl | string | :x: | The base URL to use to perform the query | `https://graphql-listen.datocms.com` | +| prop | type | required | description | default | +| ------------------ | ------------------------------------------------------------------------------------------ | ------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------ | +| enabled | boolean | :x: | Whether the subscription has to be performed or not | true | +| query | string \| [`TypedDocumentNode`](https://github.com/dotansimha/graphql-typed-document-node) | :white_check_mark: | The GraphQL query to subscribe | | +| token | string | :white_check_mark: | DatoCMS API token to use | | +| variables | Object | :x: | GraphQL variables for the query | | +| includeDrafts | boolean | :x: | If true, draft records will be returned | | +| excludeInvalid | boolean | :x: | If true, invalid records will be filtered out | | +| environment | string | :x: | The name of the DatoCMS environment where to perform the query (defaults to primary environment) | | +| contentLink | `'vercel-1'` or `undefined` | :x: | If true, embed metadata that enable Content Link | | +| baseEditingUrl | string | :x: | The base URL of the DatoCMS project | | +| cacheTags | boolean | :x: | If true, receive the Cache Tags associated with the query | | +| initialData | Object | :x: | The initial data to use on the first render | | +| reconnectionPeriod | number | :x: | In case of network errors, the period (in ms) to wait to reconnect | 1000 | +| fetcher | a [fetch-like function](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) | :x: | The fetch function to use to perform the registration query | window.fetch | +| eventSourceClass | an [EventSource-like](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) class | :x: | The EventSource class to use to open up the SSE connection | window.EventSource | +| baseUrl | string | :x: | The base URL to use to perform the query | `https://graphql-listen.datocms.com` | ## Connection status