diff options
author | Michael Muré <batolettre@gmail.com> | 2018-08-23 21:24:57 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-08-23 21:24:57 +0200 |
commit | 0514edad1a6ee06902841e0c903fc2a2119b7e95 (patch) | |
tree | 104279a8939034ab163cac9bfc124166d001dda7 /graphql | |
parent | e7648996c8f278d061fe03a5c4d255049da765e5 (diff) | |
download | git-bug-0514edad1a6ee06902841e0c903fc2a2119b7e95.tar.gz |
cache: maintain, write and load from disk bug excerpts
Diffstat (limited to 'graphql')
-rw-r--r-- | graphql/models/models.go | 8 | ||||
-rw-r--r-- | graphql/resolvers/mutation.go | 4 | ||||
-rw-r--r-- | graphql/resolvers/query.go | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/graphql/models/models.go b/graphql/models/models.go index e55dfb3e..dfe3a29f 100644 --- a/graphql/models/models.go +++ b/graphql/models/models.go @@ -12,11 +12,11 @@ type ConnectionInput struct { } type Repository struct { - Cache cache.Cacher - Repo cache.RepoCacher + Cache *cache.RootCache + Repo *cache.RepoCache } type RepositoryMutation struct { - Cache cache.Cacher - Repo cache.RepoCacher + Cache *cache.RootCache + Repo *cache.RepoCache } diff --git a/graphql/resolvers/mutation.go b/graphql/resolvers/mutation.go index 2a81716c..9c5a589d 100644 --- a/graphql/resolvers/mutation.go +++ b/graphql/resolvers/mutation.go @@ -9,10 +9,10 @@ import ( ) type mutationResolver struct { - cache cache.Cacher + cache *cache.RootCache } -func (r mutationResolver) getRepo(repoRef *string) (cache.RepoCacher, error) { +func (r mutationResolver) getRepo(repoRef *string) (*cache.RepoCache, error) { if repoRef != nil { return r.cache.ResolveRepo(*repoRef) } diff --git a/graphql/resolvers/query.go b/graphql/resolvers/query.go index 4154964f..0e7f3a6f 100644 --- a/graphql/resolvers/query.go +++ b/graphql/resolvers/query.go @@ -8,7 +8,7 @@ import ( ) type rootQueryResolver struct { - cache cache.Cacher + cache *cache.RootCache } func (r rootQueryResolver) DefaultRepository(ctx context.Context) (*models.Repository, error) { |