handling server side graphql errors without suspense
See original GitHub issuewith getDataFromTree you could wrap the call in a try-catch block to prevent graphql errors from crashing app, since you could still render the html markup
but since getDataFromMarkup combines fetching data and rendering html, how should server side graphql errros be handled if you’re not yet using suspense?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Handling operation errors - Apollo GraphQL Docs
Apollo Client can encounter a variety of errors when executing operations on your GraphQL server. Apollo Client helps you handle these errors according...
Read more >Error Handling in GraphQL -- newline - Fullstack.io
GraphQL servers are able to handle errors by default, both for syntax and validations errors. You've probably already seen this when using ...
Read more >How to handle GraphQL errors with React-Apollo?
I'm trying to move from Rest API to GraphQL using Express + Mongoose on server and React + Apollo on ...
Read more >GraphQL made simple with React Suspense and Hooks
Using Suspense and hooks, we can write clean and functional code to manage state and handle errors while fetching GraphQL data.
Read more >Server-side Rendering | urql Documentation
However, Suspense is not supported by React during server-side rendering. Using the react-ssr-prepass ... npm install --save next-urql react-is urql graphql.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Yes, good catch. It seems our implementation of
getMarkupFromTreeis incompatible with the one in react-apollo: https://github.com/apollographql/react-apollo/blob/6a02550db2b14881582ede2c4e1a3e1ef51f0b7a/test/client/getDataFromTree.test.tsx#L1572. We should change this behavior.so would it be OK to remove this snippet here? https://github.com/trojanowski/react-apollo-hooks/blob/master/src/getMarkupFromTree.tsx#L32-L34
and let end user decide how they want to handle non-suspense errors