Last active
May 26, 2017 15:11
-
-
Save tazsingh/8f045d3847bacfbdd794b6ebf989e599 to your computer and use it in GitHub Desktop.
Fragment Subscriptions - Directive Approach
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fragment userFragment on User | |
@subscribeTo(name: "avatarChange", with: avatarChangeFragment) | |
{ | |
name | |
username | |
avatarUrl(size: 200) | |
avatarChangeId # can be an implicit field on this fragment added by | |
# the server to track subscription events on the client | |
} | |
fragment avatarChangeFragment on UserAvatarChangePayload { | |
user { | |
avatarUrl(size: 200) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment