wp-graphql / wp-graphql/wp-graphql
feat: prev/next on edge
Open
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.