https://github.com/jeremy-colin/relay-examples-subscription
Example of subscriptions with Relay Modern
https://github.com/jeremy-colin/relay-examples-subscription
Last synced: about 1 month ago
JSON representation
Example of subscriptions with Relay Modern
- Host: GitHub
- URL: https://github.com/jeremy-colin/relay-examples-subscription
- Owner: jeremy-colin
- Created: 2018-01-23T12:34:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-04T10:15:12.000Z (about 7 years ago)
- Last Synced: 2024-11-19T16:42:38.262Z (7 months ago)
- Language: JavaScript
- Size: 86.9 KB
- Stars: 30
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- Awesome-List - Relay Examples Subscription - JS - Example of subscriptions with Relay Modern. (💖 Admired Examples)
- awesome-list - Relay Examples Subscription - JS - Example of subscriptions with Relay Modern. (💖 Admired Examples)
- awesome-list - Relay Examples Subscription - JS - Example of subscriptions with Relay Modern. (💖 Admired Examples)
README
# Relay TodoMVC with Subscriptions on the 'AddTodoMutation'
Open 2 tabs, add a todo into one tab, it is also in the other tab.
Implementation is still imperfect because the counter is not updated but purpose was to show subscriptions end to end flow with up to date librairies.
## Installation
```
yarn install
```## Running
Set up generated files:
```
yarn update-schema
yarn build
```Start a local server:
```
yarn start
```## Developing
Any changes you make to files in the `js/` directory will cause the server to
automatically rebuild the app and refresh your browser.If at any time you make changes to `data/schema.js`, stop the server,
regenerate `data/schema.graphql`, and restart the server:```
yarn update-schema
yarn build
yarn start
```## License
This is a fork of the official [relayjs/relay-examples](https://github.com/relayjs/relay-examples)
This file provided by Facebook is for non-commercial testing and evaluation
purposes only. Facebook reserves all rights not expressly granted.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.