From ecc051a439a641bb8d9ee523a9f023dc076945f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Tue, 31 May 2022 18:34:07 +0200 Subject: [PATCH] Update Homepage query Filter published photos only --- src/routes/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/routes/index.ts b/src/routes/index.ts index a9b9ab1..652bf9f 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -5,7 +5,11 @@ export async function get({}: RequestEvent): Promise { try { const res = await fetchAPI(` query { - photo (limit: 11, sort: ["-date_created"]) { + photo ( + limit: 11, + sort: ["-date_created"], + filter: { status: { _eq: "published" }}, + ) { slug title city