Add GraphQL dataloaders for batched record lookups
Introduce dataloadgen-based dataloaders to batch individual record-by-ID fetches in GraphQL resolvers into single SQL queries. Each entity type (organization, framework, control, vendor, document, risk, measure, task, file, report, profile) gets a LoadByIDs method in coredata and a GetByIDs service method with variadic arguments and dedicated collection return types. Resolvers now use dataloader.FromContext instead of direct service calls for single-record lookups. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
1
go.mod
1
go.mod
@@ -31,6 +31,7 @@ require (
|
||||
github.com/scim2/filter-parser/v2 v2.2.0
|
||||
github.com/stretchr/testify v1.11.1
|
||||
github.com/vektah/gqlparser/v2 v2.5.32
|
||||
github.com/vikstrous/dataloadgen v0.0.10
|
||||
github.com/yuin/goldmark v1.7.16
|
||||
go.abhg.dev/goldmark/mermaid v0.6.0
|
||||
go.gearno.de/crypto/uuid v0.1.1-0.20251208105319-3f587312a712
|
||||
|
||||
Reference in New Issue
Block a user