Skip to content

Fixes #74 - Add API Pagination for Orders#82

Merged
brandonw504 merged 3 commits into
mainfrom
feat/api-pagination
Jun 25, 2025
Merged

Fixes #74 - Add API Pagination for Orders#82
brandonw504 merged 3 commits into
mainfrom
feat/api-pagination

Conversation

@beanbeanjuice
Copy link
Copy Markdown
Contributor

@beanbeanjuice beanbeanjuice commented May 29, 2025

This fixes #74. Adds pagination for the orders query with GraphQL and Prisma. It was tested with the following queries (which all appear to be working properly).

query GetLast10Orders {
  orders(offset: 0, limit: 10) {
    id,
    customer_name,
    status
    created_at,
  }
}

query GetLast10DeliveredOrders {
  orders(statuses: ["delivered"], offset: 0, limit: 10) {
    id,
    customer_name,
    status,
    created_at
  }
}

query GetLast10OrdersWithOffset {
  orders(offset: 1, limit: 10) {
    id,
    customer_name,
    status,
    created_at
  }
}

Copy link
Copy Markdown
Contributor

@brandonw504 brandonw504 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pagination looks great!

@brandonw504 brandonw504 merged commit bc044a8 into main Jun 25, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

API Pagination

2 participants