From eedd34a59418de6d2eddedd9e222c3a8b7bfff1e Mon Sep 17 00:00:00 2001
From: Stephanie Freitag <stephanie.freitag@holi.team>
Date: Thu, 31 Aug 2023 15:08:53 +0000
Subject: [PATCH] HOLI-5766: add default values to graphql api for pagination

---
 app/server.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/server.ts b/app/server.ts
index bb82b37..5928f15 100644
--- a/app/server.ts
+++ b/app/server.ts
@@ -67,10 +67,10 @@ const typeDefs = `
   
     type Query {
         # uses offset-based pagination as described in https://www.apollographql.com/docs/react/pagination/offset-based
-        engagementOpportunities(offset: Int!, limit: Int!, location: GeoJSON, category: String): EngagementsResponse!
+        engagementOpportunities(offset: Int! = 0, limit: Int! = 10, location: GeoJSON, category: String): EngagementsResponse!
         engagement(id: String!): Engagement
         categories: CategoriesResponse!
-        engagements(offset: Int!, limit: Int!, location: String, category: String, longitude: Float, latitude: Float, radiusKm: Float): EngagementsResponse! @deprecated(reason: "Use engagementOpportunities instead, as its support will be discontinued after 1.5.1.")
+        engagements(offset: Int! = 0, limit: Int! = 10, location: String, category: String, longitude: Float, latitude: Float, radiusKm: Float): EngagementsResponse! @deprecated(reason: "Use engagementOpportunities instead, as its support will be discontinued after 1.5.1.")
         cities: CitiesResponse! @deprecated(reason: "It will no longer be supported after 1.5.1.")
     }
 
-- 
GitLab