Skip to content

GuillemotF/react-apollo-error-template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apollo Client Error Template

Related Issues:

This template demonstrate multiple issues :

  • An unhandled network error when unmounting a component that failed to fetch
  • Undefined response in afterware for a network error (e.g. client offline or server crashed)
  • Component can't render data after an error (stuck on error)

How it works

This template is using the Fake graphql server from : http://fake.graphql.guru/

You'll have to simulate an offline state (e.g with chrome developer tools -> Network), this is the same behavior as server offline or crashed.

The "New component with apollo" button calls a component with apolloClient HOC querying a random firstname

Steps to reproduce issues

  • run yarn then yarn start (or npm install then npm run start)
  • Go offline, click button to fetch then unmount the component to throw the error in console
  • Go online then try to fetch/refetch, the component still displays error (but queries are sent and return data)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 77.9%
  • HTML 21.4%
  • CSS 0.7%