Back to Urql

With `@defer` / `@stream` Directives

examples/with-defer-stream-directives/README.md

1.8.21.1 KB
Original Source

With @defer / @stream Directives

<p> <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-defer-stream-directives"> </a> <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-defer-stream-directives"> </a> </p>

This example shows urql in use with @defer and @stream directives in GraphQL.

To run this example install dependencies and run the start script:

sh
yarn install
yarn run start
# or
npm install
npm run start

This example contains:

  • The urql bindings and a React app with a client set up in src/App.jsx
  • A local graphql-yoga server set up to test deferred and streamed results in server/.