Add GraphQL endpoint to get product analytics usage for a group and its projects
Proposal
As part of Product Analytics Usage Quota MVC Implementatio... (#419407 - closed) we need to create a GraphQL endpoint (CI minutes has a good example) for frontend to consume which allows us to:
- Get the breakdown of each project's usage for the current billing period
- Get the breakdown for each project's usage for the previous billing period
- Paginate the projects list for larger groups
- Get the total group/namespace usage for the current billing period (iteration 2)
- Get the total group/namespace usage for the previous billing period (iteration 2)
This will be used by:
- Create app structure for product analytics usag... (#424149 - closed)
- Add product analytics usage visualization for e... (#424151 - closed)
- Add product analytics usage table for each proj... (#424152 - closed)
- Add product analytics usage visualization to sh... (#424153 - closed)
We should also do the necessary documentation for this new endpoint.
backend
Implementation plan –- Create domain logic to query the analytics-configurator
- Consider whether to add caching, that may be a future iteration.
- Create additions to the GraphQL API with an interface like this:
query {
group(fullPath: "test-group") {
projects {
nodes {
productAnalyticsUsage(month: "9", year: "2023") {
eventsProcessed
}
}
}
}
Edited by Max Woolf