diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-15 16:36:58 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-15 16:36:58 +0200 |
| commit | 235fe67d770f83131c9ec10b99012319440db690 (patch) | |
| tree | 3b96e2c8a5877fe15a9cfa6bff46130fa7a04a65 /src/services/graphql/articles.ts | |
| parent | fe2252ced2bb895e26179640553b5a6c02957d54 (diff) | |
chore: add Search page
Diffstat (limited to 'src/services/graphql/articles.ts')
| -rw-r--r-- | src/services/graphql/articles.ts | 3 |
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; |
