Open jepify opened 5 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.
NetBox version
v4.0.2
Feature type
Data model extension
Proposed functionality
Pagination in GraphQL. With the newly Strawberry.rocks GraphQL engine, it is possible to implement Pagination with a few simple modifications.
GraphQL Pagination Strawberry Pagination Strawberry Django offset-based Strawberry Django cursor-based
Given the different ways of implementing pagination, it should be able to co-exist with non paginated queries, if needed. This could be done by e.g. keeping the regular e.g.
device_list
query and adevice_connection
query.Use case
With large tables with e.g. interfaces doing queries with nested objects takes a lot of time due to the translation from QuerySets via the Execution of fields part of the spec.
Other forks like Nautobot supports offset-based pagination and the Rest API supports offset-based, so it would be a nice addition to the future use of GraphQL.
Currently if we want to do pagination for GraphQL we are to utilize the ordering and pagination of the Rest API with
ordering
andid__gt
queries.The query could be:
And would result in:
Database changes
None
External dependencies
None