summaryrefslogtreecommitdiffstats
path: root/src/services/graphql/articles.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/graphql/articles.ts')
-rw-r--r--src/services/graphql/articles.ts3
1 files changed, 2 insertions, 1 deletions
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<number>} - The articles total number.
*/
-export const getTotalArticles = async (): Promise<number> => {
+export const getTotalArticles = async (search?: string): Promise<number> => {
const response = await fetchAPI<TotalItems, typeof totalArticlesQuery>({
api: getAPIUrl(),
query: totalArticlesQuery,
+ variables: { search },
});
return response.posts.pageInfo.total;