From 1bbd6a285de39bbf9c384e7d2977b3495d4faff2 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Mon, 19 Jun 2023 09:36:22 +0200 Subject: [PATCH] docs: Improve docs for detail view routing --- .../extending-the-admin-ui/creating-detail-views/index.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/content/plugins/extending-the-admin-ui/creating-detail-views/index.md b/docs/content/plugins/extending-the-admin-ui/creating-detail-views/index.md index feb79d2fc1..3ba1b266b3 100644 --- a/docs/content/plugins/extending-the-admin-ui/creating-detail-views/index.md +++ b/docs/content/plugins/extending-the-admin-ui/creating-detail-views/index.md @@ -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: {