Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for SSR and Suspense. #102

Closed
6 tasks done
parkerziegler opened this issue Sep 18, 2019 · 3 comments
Closed
6 tasks done

Add support for SSR and Suspense. #102

parkerziegler opened this issue Sep 18, 2019 · 3 comments
Assignees

Comments

@parkerziegler
Copy link
Contributor

parkerziegler commented Sep 18, 2019

urql v1.1.0 introduced server-side rendering and basic support for Suspense on the server via react-ssr-prepass. With the new goal being to bind reason-urql's next version to urql v1.1.3, this becomes a major priority for us. The responsibility on the binding side is actually quite small (relatively) here:

  • Upgrade urql dependency to v1.1.3. This is the v1.1.x version that contains several important bug fixes before jumping to 1.2.0, which may require a change to the bindings to work properly.
  • Add suspense flag to Client configuration.
  • Create bindings for react-ssr-prepass – this should be done in a separate repo at FormidableLabs/bs-react-ssr-prepass.
  • Bind ssrExchange.
  • Add unit tests for ssrExchange.
  • Create a working NextJS example – we'll likely want to copy the one Zeit has already in place for starters: https://github.com/zeit/next.js/tree/canary/examples/with-reasonml
@parkerziegler
Copy link
Contributor Author

For those tracking this issue, bs-react-ssr-prepass is live here: https://github.com/FormidableLabs/bs-react-ssr-prepass

@parkerziegler
Copy link
Contributor Author

Latest PR for this issue merged #111. WIll be released in v1.1.0.

@parkerziegler parkerziegler self-assigned this Nov 10, 2019
@parkerziegler
Copy link
Contributor Author

An example using reason-urql with Next is available here: https://github.com/parkerziegler/reason-urql-ssr We'll link this example in the README as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant