Skip to content

Instantly share code, notes, and snippets.

@kamilkisiela
Created August 14, 2018 12:09
Show Gist options
  • Save kamilkisiela/0e3f2f3fe6da3dbdba04599b0cbc985d to your computer and use it in GitHub Desktop.
Save kamilkisiela/0e3f2f3fe6da3dbdba04599b0cbc985d to your computer and use it in GitHub Desktop.
Using Query Service
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