Sprinto Developer API

Pagination

Let's dive into the realm of GraphQL pagination, where the art of managing vast datasets becomes a breeze. This technique empowers you to fetch smaller, more manageable subsets of data, enhancing both response speed and API performance. To embark on this journey seamlessly, acquaint yourself with the pagination arguments at your disposal.

Sprinto Developer API: A Playground for Pagination Mastery

Our API uses cursor-based pagination and aligns with the Relay Pagination Spec, offering you an efficient toolset to traverse and control your data. For a hands-on experience, we highly recommend setting up API Playground

ℹ️

Things to Keep in Mind:

  • The Sprinto Developer API is currently in beta. As it evolves based on feedback, be prepared for potential changes to API endpoints.
  • The API sets a maximum query limit of 10 request per minute. The server will communicate the error if you exceed the rate-limitation.

Supported Pagination Arguments

Let's acquaint ourselves with the pagination arguments that Sprinto Developer API gracefully supports:

Pagination argumentsDefinition
firstThe number of records you want to fetch in a single page.
afterUsed when navigating to the next page. The provided value should be the cursor of the last node in the current page.
beforeUsed when navigating back to the previous page. The provided value should be the cursor of the first node in the current page.
edgeEdges represent individual items within the available graph. The edges mainly consist of two-term nodes and cursors.
cursorThis unique identifier for the edge allows you to navigate through the connection and retrieve specific items. Every node will have a unique cursor to navigate and query specific nodes.
nodeThis is the actual data object itself in the graph. For example, workflowcheckpaginated is a node on Sprinto Developer API.

Let's Dive into an Example Query

In the query below, we seek to unveil details about the first five workflow checks that come after a specific cursor ID, leveraging the power of first and after arguments.

query WorkflowChecksPaginated($first: Int, $after: String) {  
  workflowChecksPaginated(first: 5, after: "dfsdfdscdsfsadcdsafasdcdsfcddsfc--00fdc") {  
    edges {  
      cursor  
      node {  
        title  
      }  
    }  
    totalCount  
  }  
}
{  
  "data": {  
    "workflowChecksPaginated": {  
      "edges": [  
        {  
          "cursor": "dsfasfsdfewrfdcdGRFGVSAVS=CV==",  
          "node": {  
            "title": "Periodic review of the users having access to Lokmat"  
          }  
        },  
        // ... (details of other workflow checks)  
      ],  
      "totalCount": 110  
    }  
  }  
}