Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination on content types ! determining length !? #2

Closed
drupalshift opened this issue Aug 24, 2016 · 1 comment
Closed

Pagination on content types ! determining length !? #2

drupalshift opened this issue Aug 24, 2016 · 1 comment

Comments

@drupalshift
Copy link

drupalshift commented Aug 24, 2016

Hi there , i am trying to get nodes from my article content type , i am wondering how can i use offset and limit since i can't get length of my entity !?

{
    nodeQuery(limit:2 ,offset:4) {
    ... on EntityNodeArticle {
      vid,
      articleImage {
        ... on FieldItemNodeFieldArticleImage {
          entity {
            uri
          }
        }
        alt
        title
        width
        height
      }
    }
  }
}

How can i get length of EntityNodeArticle ? so i can use it for pagination with limit and offset !


Another question is am i able to use pagination in graphql display views , i mean if i create a view and limiting pagination to show 1 node , how can i pass the offset in graphql !

{
   frontpageGraphql1 {
    ...on EntityNodeArticle {
      title
    }
  }
}
@fubhy
Copy link
Contributor

fubhy commented Oct 1, 2016

We are currently re-doing the schema for 3.x using the Relay Connection model which contains pagination functionality. Please stay tuned. Sorry for the late reply...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants