[GraphQL] Fetch Server Data and Client-side State in One Query using React Apollo + GraphQL

In this lesson we look at how the Apollo @client directive can be used to fetch client-side state along with server data with one query. I also show how to update the client-side state using a mutation connected to a button.

Additional Resources Apollo Client 2.0

https://www.apollographql.com/docs/react/essentials/local-state.html#defaults.html

 

 

posted @ 2018-04-03 22:47  Zhentiw  阅读(156)  评论(0编辑  收藏  举报