Skip to content

Commit

Permalink
docs: Improve docs for detail view routing
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Jun 19, 2023
1 parent cb37b3e commit 1bbd6a2
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,10 @@ import { GetReviewDocument, GetReviewDetailQuery } from './generated-types';
// Here we are using the DataService to load the detail data
// from the API. The `GetReviewDocument` is a generated GraphQL
// TypedDocumentNode.
return inject(DataService)
const review$ = inject(DataService)
.query(GetReviewDocument, { id: route.paramMap.get('id') })
.mapStream(data => ({ entity: of(data.productReview) }));
.mapStream(data => data.review);
return of({ detail: { entity: review$ } });
},
},
data: {
Expand Down

0 comments on commit 1bbd6a2

Please sign in to comment.