-
Notifications
You must be signed in to change notification settings - Fork 27
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
Remix #248
Comments
Thoughts on LoadersLoaders run independently of React.
As a result, our current "inject into the stream" approach won't work - we have no way of sharing an AC instance reliably between => each loader should create their own instance of Apollo Client and const loader = () => {
const preload = createQueryPreloader(makeClient())
const result1 = preload(query1)
const result2 = preload(query2)
return defer({
result1,
result2
})
} Now, right now So we probably need to wrap It could create a value like {
query,
variables,
resultPromise
} which would then be picked up by an (also wrapped) Currently, the defer implementation doesn't support promises that are not on the top level yet. We'd probably need buy-in from the Remix team here to be able to make according changes on their side - once we have fleshed out this story more. |
First the good news: streaming SSR with the suspense hooks and Remix works.
All the setup for that is in this diff: phryneas/remix-apollo-stream-example@bc43efe
That said, supporting loaders is another beast.
I'll add my thoughts in this thread.
The text was updated successfully, but these errors were encountered: