[PR #20578] [CLOSED] 19724 Add pagination metadata to GraphQL queries #15968

Closed
opened 2025-12-30 00:25:04 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20578
Author: @arthanson
Created: 10/14/2025
Status: Closed

Base: featureHead: 19724-graphql


📝 Commits (10+)

  • 0c4d0fa 19724 pagingate graphql queries
  • c2d1911 19724 update documentation
  • 8aa1e28 19724 fix tests
  • 730aee9 19724 fix doc query
  • 595b343 19724 add doc note
  • b7b7b00 Merge branch 'feature' into 19724-graphql
  • 91b2d61 19724 Use v2 API for new pagination queries
  • 810d1c2 19724 add the v2 to graphql testing
  • af55da0 19724 add the v2 to graphql testing
  • 26c91f0 19724 update docs

📊 Changes

14 files changed (+791 additions, -89 deletions)

View changed files

📝 docs/integrations/graphql-api.md (+147 -2)
📝 netbox/circuits/graphql/schema.py (+40 -1)
📝 netbox/core/graphql/schema.py (+11 -1)
📝 netbox/dcim/graphql/schema.py (+136 -1)
📝 netbox/extras/graphql/schema.py (+56 -1)
📝 netbox/ipam/graphql/schema.py (+59 -1)
📝 netbox/netbox/graphql/schema.py (+20 -20)
📝 netbox/netbox/tests/test_graphql.py (+91 -3)
📝 netbox/tenancy/graphql/schema.py (+23 -1)
📝 netbox/users/graphql/schema.py (+11 -1)
📝 netbox/utilities/testing/api.py (+125 -54)
📝 netbox/virtualization/graphql/schema.py (+23 -1)
📝 netbox/vpn/graphql/schema.py (+35 -1)
📝 netbox/wireless/graphql/schema.py (+14 -1)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/20578 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 10/14/2025 **Status:** ❌ Closed **Base:** `feature` ← **Head:** `19724-graphql` --- ### 📝 Commits (10+) - [`0c4d0fa`](https://github.com/netbox-community/netbox/commit/0c4d0fa2e8094ea4b08fcfc6db1b11c27201097f) 19724 pagingate graphql queries - [`c2d1911`](https://github.com/netbox-community/netbox/commit/c2d19119cb8c8b4d07f9859d465771b1eba4fcea) 19724 update documentation - [`8aa1e28`](https://github.com/netbox-community/netbox/commit/8aa1e2802b190d40687438bbcea47003c4bf51d4) 19724 fix tests - [`730aee9`](https://github.com/netbox-community/netbox/commit/730aee9b265ca4b64b7a976446d0410e988ddbb1) 19724 fix doc query - [`595b343`](https://github.com/netbox-community/netbox/commit/595b343cd0c3ab2bcf9f87e9cdfe0643ce3a50d9) 19724 add doc note - [`b7b7b00`](https://github.com/netbox-community/netbox/commit/b7b7b0088587bde38d4281fe0d19f39d68c00724) Merge branch 'feature' into 19724-graphql - [`91b2d61`](https://github.com/netbox-community/netbox/commit/91b2d61ea41f7ab4108a7648fabeea956a78d305) 19724 Use v2 API for new pagination queries - [`810d1c2`](https://github.com/netbox-community/netbox/commit/810d1c24187e5bed0a40c29fafe2d31af8b383a7) 19724 add the v2 to graphql testing - [`af55da0`](https://github.com/netbox-community/netbox/commit/af55da008b52bdc294ebd52c6afa2b0cf139d8d8) 19724 add the v2 to graphql testing - [`26c91f0`](https://github.com/netbox-community/netbox/commit/26c91f01c6f64db3fbd8a19e87e803bff0efbf65) 19724 update docs ### 📊 Changes **14 files changed** (+791 additions, -89 deletions) <details> <summary>View changed files</summary> 📝 `docs/integrations/graphql-api.md` (+147 -2) 📝 `netbox/circuits/graphql/schema.py` (+40 -1) 📝 `netbox/core/graphql/schema.py` (+11 -1) 📝 `netbox/dcim/graphql/schema.py` (+136 -1) 📝 `netbox/extras/graphql/schema.py` (+56 -1) 📝 `netbox/ipam/graphql/schema.py` (+59 -1) 📝 `netbox/netbox/graphql/schema.py` (+20 -20) 📝 `netbox/netbox/tests/test_graphql.py` (+91 -3) 📝 `netbox/tenancy/graphql/schema.py` (+23 -1) 📝 `netbox/users/graphql/schema.py` (+11 -1) 📝 `netbox/utilities/testing/api.py` (+125 -54) 📝 `netbox/virtualization/graphql/schema.py` (+23 -1) 📝 `netbox/vpn/graphql/schema.py` (+35 -1) 📝 `netbox/wireless/graphql/schema.py` (+14 -1) </details> ### 📄 Description ### 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:25:04 +01:00
adam closed this issue 2025-12-30 00:25:04 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15968