How To Build An Ionic App With A Graphcool Backend - Part 5

By Ashteya Biharisingh

Add subscription GraphQL
Let's set up the subscription in ShoppingListProvider. This particular subscription will fire for these kinds of mutations: CREATED, UPDATED and DELETED. You can also set it up to only handle one specific type of mutation.

We are specifying which data we want to receive, this will include the mutation type, the item data as node and any previous values that we're interested in. In this case, I only want to know the id so that in the case of a DELETED mutation, I'll know which item was deleted.

Read the full article....

Share on Google Plus

About www.

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment


Post a Comment