Skip to content

Conversation

arthanson
Copy link
Collaborator

@arthanson arthanson commented Oct 14, 2025

Fixes: #19724

Adds new OffsetPaginated Generic to the v2 of the GraphQL API. For information on OffsetPaginated Generic see: https://strawberry.rocks/docs/django/guide/pagination. This returns metadata of the record counts and affects both the return of GraphQL queries as well as submission for paginated results. This PR updates the documentation on the new formats and puts in tests for the new v2 version of the queries.

@arthanson arthanson changed the title DRAFT: 19724 Add pagination metadata to GraphQL queries 19724 Add pagination metadata to GraphQL queries Oct 15, 2025
@arthanson arthanson marked this pull request as ready for review October 15, 2025 14:54
@arthanson arthanson requested review from a team and jeremystretch and removed request for a team October 15, 2025 14:54
@jeremystretch
Copy link
Member

Holding on this until we've added GraphQL API v2 per #20603. Once that's done, this can be rebased and we'll make the necessary adaptations to move the metadata to the v2 API.

@jeremystretch jeremystretch added the status: blocked Another issue or external requirement is preventing implementation label Oct 20, 2025
@jeremystretch jeremystretch removed the status: blocked Another issue or external requirement is preventing implementation label Oct 21, 2025
@jeremystretch
Copy link
Member

Following the change in #20603 (which introduced the v2 API), the GraphQL API now defaults to the original v1 format. Seems like it would be most prudent to refactor and duplicate the existing test_graphql_get_object(), test_graphql_list_objects(), and test_graphql_filter_objects() methods to test both the v1 and v2 APIs.

@arthanson arthanson marked this pull request as draft October 21, 2025 16:10
@arthanson arthanson changed the title 19724 Add pagination metadata to GraphQL queries DRAFT: 19724 Add pagination metadata to GraphQL queries Oct 21, 2025
@arthanson arthanson changed the title DRAFT: 19724 Add pagination metadata to GraphQL queries 19724 Add pagination metadata to GraphQL queries Oct 21, 2025
@arthanson arthanson marked this pull request as ready for review October 21, 2025 17:49
@arthanson
Copy link
Collaborator Author

@jeremystretch ready for re-review.

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.

2 participants