Closed ivan-kleshnin closed 4 years ago
Maybe the most effective way of doing this would be to utilise `react-ssr-prepass' again for this. I ran into this problem before and in theory one can add a hook that uses the result if it’s run server-side and triggers and throws an error. This can then be picked up by catching it with the prepass.
👋 Hey @ivan-kleshnin we've moved next-urql
over the urql
monorepo. If you'd still like help on this issue or want to continue this discussion please raise it over in that repo and tag it with the next-urql
tag. Thanks!
Is there a way to set HTTP status code with Next-URQL (server-side)? How to do that?
Without a GraphQL client, when I manually invoked
fetchGQL
helper, I had something like:Now I can't have access to
ctx.res
from a component function (serialization kills functions and circular objects) and I don't have access to results of fetching ingetInitialProps
. So basically I can't use that approach.I guess it's possible to get HTTP response data via exchanges but I don't think I have access to
ctx.res
from where those are available. Please clarify.