Design: Why don't I see all my components? How to use Pagination

Modified on Thu, 25 Jan 2024 at 11:46 AM

By default, 10 components will be returned.

To return more components, you can use pagination.


This example will return the first N components in your workspace. In this case, 100:

query library {
  desLibrary(workspaceUrl: "<EXAMPLE WORKSPACE URL>") {
    components(first: 100){
      nodes {
        id
        name
        details {
          parameters {
            type
            name
            value
          }
        }
      }
    }
  }
}


This example will return the components that come after the specified cursor. Cursors can be found under Components > pageInfo

query library {
  desLibrary(workspaceUrl: "<EXAMPLE WORKSPACE URL>") {
    components(after: "OQ=="){
      pageInfo {
        endCursor
      }
      nodes {
        id
        name
        details {
          parameters {
            type
            name
            value
          }
        }
      }
    }
  }
}


This example will return the last N components in your workspace. In this case, 100:

query library {
  desLibrary(workspaceUrl: "<EXAMPLE WORKSPACE URL>") {
    components(last: 100){
      nodes {
        id
        name
        details {
          parameters {
            type
            name
            value
          }
        }
      }
    }
  }
}


This example will return the components that come before the specified cursor.

query library {
  desLibrary(workspaceUrl: "<EXAMPLE WORKSPACE URL>") {
    components(before: "OQ=="){
      pageInfo {
        endCursor
      }
      nodes {
        id
        name
        details {
          parameters {
            type
            name
            value
          }
        }
      }
    }
  }
}



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article