Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.apollo
- .watchQuery({
- query: getAllMembers,
- })
- .valueChanges
- .pipe(
- tap(returnedData => {
- ... does some stuff to one of the returned properties...
- })
- )
- .subscribe(result => {
- this.dataSource.data = result.data['getMembers'];
- console.log('errors in getAllRecords', result.errors)
- });
- this.apollo
- .watchQuery({ // This watchQuery is somehow calling the list's
- // watchQuery. There is no code anywhere that does that and
- // there were no problems with the original REST code. This is
- // a GraphQL thing.
- fetchPolicy: 'network-only',
- query: getMemberByID,
- variables: {
- member_id: member_id,
- },
- })
- .valueChanges
- .subscribe(result => {
- let data = result.data['getMember'];
- this.addData(data, skillNames); // Call function below to populate modal.
- console.log('errors in view-member', result.errors);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement