wp-graphql / wp-graphql/wp-graphql

feat: prev/next on edge

Open
#1,133 8 comments 0 reactions 1 assignee View on GitHub

@jasonbahl is already working on this.

Since Jan 24, 2020.

component: connections effort: high has: workaround impact: med needs: discussion type: spike :volleyball:
Dominant language
PHP
Stars
3.8k
Forks
472
Avg merge
1d 7h
Merged PRs (30d)
85

Description

I've seem other GraphQL APIs on CMSs provide prev and next connections on a node edge. This would be helpful in my case for creating page level navigation for next post and previous post. I've solved this in JS for now but it would be nice for these to be available in query. It would look something like:

query {
  posts {
    edges {
      next {
        #WpGraphql_Post
      }
      prev {
        #WpGraphql_Post
      }
      node {
        #WpGraphql_Post
       }
    }
  }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.