Backend: Add pagination for inherited group variables table
Summary
Follow-up for Display when inherited group variables are prot... (#222367 - closed) and the discussion in !119444 (comment 1383645791).
Are we aware of how many variables we could return?
Is there any limitation built-in or expected? Do we want to paginate if there is a chance there will be too many?
Once the table for inherited CI Variables is migrated to Vue (!119026 (merged)), we should look into paginating the fetch query instead of batch loading them. The table shows variables inherited from the parent group and ancestors, so there's potentially a lot of variables here.
Proposal
-
Update backend query when fetching the data shown on the page
The GraphQL query being used in the frontend is app/assets/javascripts/ci/inherited_ci_variables/graphql/queries/inherited_ci_variables.query.graphql.
The MR !119026 (merged) must be merged first.
query getInheritedCiVariables($after: String, $first: Int, $fullPath: ID!) {
project(fullPath: $fullPath) {
id
inheritedCiVariables(after: $after, first: $first) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
nodes {
__typename
id
key
variableType
environmentScope
groupCiCdSettingsPath
groupName
masked
protected
raw
}
}
}
}
Additional details
Some relevant technical details, if applicable, such as:
- Does this need a feature flag?
- Does there need to be an associated instrumentation issue created related to this work?
- Is there an example response showing the data structure that should be returned (new endpoints only)?
- What permissions should be used?
- Is this EE or CE?
-
EE -
CE
-
- Additional comments:
Implementation Table
Group | Issue Link |
---|---|
backend |
|
frontend | #410466 |