diff options
author | Michael Muré <batolettre@gmail.com> | 2022-07-25 13:16:16 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2022-07-25 13:27:17 +0200 |
commit | 3d454d9dc8ba2409046c0938618a70864e6eb8ef (patch) | |
tree | 8745f656cc8218654632ce003f997a39988d3043 /api/graphql/resolvers/bug.go | |
parent | 2ade8fb1d570ddcb4aedc9386af46d208b129daa (diff) | |
download | git-bug-3d454d9dc8ba2409046c0938618a70864e6eb8ef.tar.gz |
entity/dag: proper base operation for simplified implementation
- reduce boilerplace necessary to implement an operation
- consolidate what an operation is in the core, which in turn pave the way for a generic cache layer mechanism
- avoid the previously complex unmarshalling process
- support operation metadata from the core
- simplified testing
Diffstat (limited to 'api/graphql/resolvers/bug.go')
-rw-r--r-- | api/graphql/resolvers/bug.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/api/graphql/resolvers/bug.go b/api/graphql/resolvers/bug.go index 815cba8d..18c8d7f4 100644 --- a/api/graphql/resolvers/bug.go +++ b/api/graphql/resolvers/bug.go @@ -7,6 +7,7 @@ import ( "github.com/MichaelMure/git-bug/api/graphql/graph" "github.com/MichaelMure/git-bug/api/graphql/models" "github.com/MichaelMure/git-bug/bug" + "github.com/MichaelMure/git-bug/entity/dag" ) var _ graph.BugResolver = &bugResolver{} @@ -69,14 +70,14 @@ func (bugResolver) Operations(_ context.Context, obj models.BugWrapper, after *s Last: last, } - edger := func(op bug.Operation, offset int) connections.Edge { + edger := func(op dag.Operation, offset int) connections.Edge { return models.OperationEdge{ Node: op, Cursor: connections.OffsetToCursor(offset), } } - conMaker := func(edges []*models.OperationEdge, nodes []bug.Operation, info *models.PageInfo, totalCount int) (*models.OperationConnection, error) { + conMaker := func(edges []*models.OperationEdge, nodes []dag.Operation, info *models.PageInfo, totalCount int) (*models.OperationConnection, error) { return &models.OperationConnection{ Edges: edges, Nodes: nodes, |