Created
August 14, 2018 12:09
-
-
Save kamilkisiela/0e3f2f3fe6da3dbdba04599b0cbc985d to your computer and use it in GitHub Desktop.
Using Query Service
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
import { FeedGQL } from ‘./feed-gql.ts’; | |
@Component({...}) | |
export class FeedComponent { | |
constructor(private feedGQL: FeedGQL) {} | |
ngOnInit() { | |
this.feedGQL.watch().valueChanges.subscribe(result => { | |
console.log(result.data); | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment