aboutsummaryrefslogtreecommitdiffstats
path: root/api/graphql/models
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-12-23 01:48:14 +0100
committerGitHub <noreply@github.com>2022-12-23 01:48:14 +0100
commit0a5a0ec1ef4ad98bc2116a953e201f96474941ab (patch)
tree660a9b17b5247fe2f954bfa814cce3193c5afa23 /api/graphql/models
parent108518530e822e3bdf59c8bfc333ad0bbe2d5fc8 (diff)
parent95911100823b5c809225d664de74ad2d64e91972 (diff)
downloadgit-bug-0a5a0ec1ef4ad98bc2116a953e201f96474941ab.tar.gz
Merge pull request #938 from MichaelMure/cache-reorg
Generic cache layer
Diffstat (limited to 'api/graphql/models')
-rw-r--r--api/graphql/models/lazy_bug.go6
-rw-r--r--api/graphql/models/lazy_identity.go6
2 files changed, 6 insertions, 6 deletions
diff --git a/api/graphql/models/lazy_bug.go b/api/graphql/models/lazy_bug.go
index 318fdc99..4b0b598e 100644
--- a/api/graphql/models/lazy_bug.go
+++ b/api/graphql/models/lazy_bug.go
@@ -58,7 +58,7 @@ func (lb *lazyBug) load() error {
return nil
}
- b, err := lb.cache.ResolveBug(lb.excerpt.Id)
+ b, err := lb.cache.Bugs().Resolve(lb.excerpt.Id())
if err != nil {
return err
}
@@ -68,7 +68,7 @@ func (lb *lazyBug) load() error {
}
func (lb *lazyBug) identity(id entity.Id) (IdentityWrapper, error) {
- i, err := lb.cache.ResolveIdentityExcerpt(id)
+ i, err := lb.cache.Identities().ResolveExcerpt(id)
if err != nil {
return nil, err
}
@@ -79,7 +79,7 @@ func (lb *lazyBug) identity(id entity.Id) (IdentityWrapper, error) {
func (lb *lazyBug) IsAuthored() {}
func (lb *lazyBug) Id() entity.Id {
- return lb.excerpt.Id
+ return lb.excerpt.Id()
}
func (lb *lazyBug) LastEdit() time.Time {
diff --git a/api/graphql/models/lazy_identity.go b/api/graphql/models/lazy_identity.go
index 27bc9619..c19d077b 100644
--- a/api/graphql/models/lazy_identity.go
+++ b/api/graphql/models/lazy_identity.go
@@ -48,16 +48,16 @@ func (li *lazyIdentity) load() (*cache.IdentityCache, error) {
return li.id, nil
}
- id, err := li.cache.ResolveIdentity(li.excerpt.Id)
+ id, err := li.cache.Identities().Resolve(li.excerpt.Id())
if err != nil {
- return nil, fmt.Errorf("cache: missing identity %v", li.excerpt.Id)
+ return nil, fmt.Errorf("cache: missing identity %v", li.excerpt.Id())
}
li.id = id
return id, nil
}
func (li *lazyIdentity) Id() entity.Id {
- return li.excerpt.Id
+ return li.excerpt.Id()
}
func (li *lazyIdentity) Name() string {