Variable $before doesn’t appear in any GraphQl query
-
I want to create headless wordpress with next.js. But when I want to create pagination I can not use before state in my query. I have added picture and my query below, my variables works fine. I have checked them
const query = ` query allPosts($after: String = "", $before: String = "", $first: Int) { posts(first: $first, after: $after, before : $before) { edges { node { author { node { name } } id title date excerpt featuredImage { node { sourceUrl title } } uri slug categories { nodes { uri count databaseId id name parent { node { uri count databaseId id name } } } } } } pageInfo { hasNextPage hasPreviousPage endCursor startCursor } } }`;
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Variable $before doesn’t appear in any GraphQl query’ is closed to new replies.