Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaushik Varanasi authored and Kaushik Varanasi committed Jul 28, 2023
1 parent f95af7c commit 63cc7ba
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,26 @@ ReactDOM.render(
);
```

Then in your App.js file

```js
import { gql, useSubscription } from "@apollo/client";

const GET_TODOS = gql`
subscription {
users {
id
email
}
}
`;

export default function Application() {
const [ data, loading] = useSubscription(GET_TODOS);
}

```

## Testing

- We use cypress tests on all the examples provided.
Expand Down

0 comments on commit 63cc7ba

Please sign in to comment.