1. 23
    Append GraphQL subscription updates to existing queries
    7m 25s

Append GraphQL subscription updates to existing queries

Share this video with your friends

Send Tweet

The useSubscription hook completely replaces previous data with any new data coming in. In this lesson, we'll use the "subscribeToMore" function provided on the useQuery hook to append notes pushed to us by the server at the top of our existing notes query. We'll also look at solving a conflict created by our "load more" functionality, which has a merge policy responsible for adding new items at the end of the existing notes query.