Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoverna committed Apr 28, 2023
1 parent 77633f7 commit 107b3d4
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions src/composables/useQuerySubscription/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ Live updates are great both to get instant previews of your content while editin

**Table of Contents**

- [Installation](#installation)
- [Reference](#reference)
- [Initialization options](#initialization-options)
- [Connection status](#connection-status)
- [Error object](#error-object)
- [Example](#example)
- [Live real-time updates](#live-real-time-updates)
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [Reference](#reference)
- [Initialization options](#initialization-options)
- [Connection status](#connection-status)
- [Error object](#error-object)
- [Example](#example)

## Installation

Expand All @@ -39,19 +41,19 @@ const {

## Initialization options

| prop | type | required | description | default |
| ------------------ | ----------------------------------------------------------------------------------------- | ------------------ | ------------------------------------------------------------------ | ------------------------------------ |
| enabled | boolean | :x: | Whether the subscription has to be performed or not | true |
| query | string | :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 | |
| 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` |

## Connection status

Expand Down

4 comments on commit 107b3d4

@vercel
Copy link

@vercel vercel bot commented on 107b3d4 Apr 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vue-datocms-site-search-example – ./examples/site-search

vue-datocms-site-search-example-datocms.vercel.app
vue-datocms-site-search-example-git-master-datocms.vercel.app
vue-datocms-site-search-example.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 107b3d4 Apr 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vue-datocms-vite-typescript-vue3-example – ./examples/vite-typescript-vue3

vue-datocms-vite-typescript-vue3-example.vercel.app
vue-datocms-vite-typescript-vue3-example-git-master-datocms.vercel.app
vue-datocms-vite-typescript-vue3-example-datocms.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 107b3d4 Apr 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vue-datocms-query-subscription-example – ./examples/query-subscription

vue-datocms-query-subscription-example-datocms.vercel.app
vue-datocms-query-subscription-example-git-master-datocms.vercel.app
vue-datocms-query-subscription-example.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 107b3d4 Apr 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vue-datocms-vue-cli-babel-javascript-vue2-example – ./examples/vue-cli-babel-javascript-vue2

vue-datocms-vue-cli-babel-javascript-vue2-ex-git-00872c-datocms.vercel.app
vue-datocms-vue-cli-babel-javascript-vue2-example-datocms.vercel.app
vue-datocms-vue-cli-babel-javascript-vue2-example.vercel.app

Please sign in to comment.