🔄 What are GraphQL connections?
Connections are a GraphQL pattern for handling lists of objects (like referrals or matters) in a standardized way. Instead of simple arrays, connections return a structured object with: A list of edges, each containing:- A node (the item you care about)
- A cursor (a pointer used for pagination)
- If there’s a
hasNextPageorhasPreviousPage - What the
startCursorandendCursorare for the current page
📦 Example paginating matters
Let’s say you want to fetch a list of matters you have access to, 10 at a time:hasNextPage is true,
you can request the next page using the endCursor:
🧠 Common use cases
Here are a few common ways to use connections in the Partner API:- List all matters using matters(first: N) with pagination
- Build an activity feed by scrolling through matter updates
- Export historical data one page at a time for internal reporting
- Sync new matters incrementally by storing the last cursor you’ve seen
📚 Learn more about GraphQL connections
If you’re new to GraphQL pagination, here are some great resources:- GraphQL Cursor Connections Specification – the original spec
- Apollo Pagination Docs – practical client-side usage
- Hasura Pagination Primer – friendly intro with visual examples
💡 Tips for implementation
- Always check pageInfo.hasNextPage before paginating
- Don’t assume cursors are sequential strings — treat them as opaque tokens
- Use cursors to resume pagination if a sync job is interrupted
- Avoid using GraphQL offset or skip patterns — they’re not supported in our API