From 235fe67d770f83131c9ec10b99012319440db690 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sun, 15 May 2022 16:36:58 +0200 Subject: chore: add Search page --- src/services/graphql/articles.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/services/graphql/articles.ts') diff --git a/src/services/graphql/articles.ts b/src/services/graphql/articles.ts index 1eb112e..41052c4 100644 --- a/src/services/graphql/articles.ts +++ b/src/services/graphql/articles.ts @@ -21,10 +21,11 @@ import { * * @returns {Promise} - The articles total number. */ -export const getTotalArticles = async (): Promise => { +export const getTotalArticles = async (search?: string): Promise => { const response = await fetchAPI({ api: getAPIUrl(), query: totalArticlesQuery, + variables: { search }, }); return response.posts.pageInfo.total; -- cgit v1.2.3