diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-20 15:37:08 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-20 15:37:08 +0200 |
| commit | f4c7ab4e306d2f04324853e67032d370abd65d0c (patch) | |
| tree | 2c7d1ad467d6c52bc134202f0d33f7524f9056fa /src/services/graphql/articles.query.ts | |
| parent | bbd63400f94b43fde04449e0c71d14763d893e6a (diff) | |
chore: handle blog pagination when JS is disabled
Diffstat (limited to 'src/services/graphql/articles.query.ts')
| -rw-r--r-- | src/services/graphql/articles.query.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/services/graphql/articles.query.ts b/src/services/graphql/articles.query.ts index e02ca8e..7bd0901 100644 --- a/src/services/graphql/articles.query.ts +++ b/src/services/graphql/articles.query.ts @@ -184,3 +184,15 @@ export const totalArticlesQuery = `query PostsTotal($search: String = "") { } } }`; + +/** + * Query the end cursor based on the queried posts number. + */ +export const articlesEndCursor = `query EndCursorAfter($first: Int) { + posts(first: $first) { + pageInfo { + hasNextPage + endCursor + } + } +}`; |
