diff options
author | Brett Walker <bwalker@gitlab.com> | 2019-09-04 17:42:48 +0000 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-09-04 17:42:48 +0000 |
commit | aa7b1cfc5b3319373a4b56c755b1fc1d4cbaff02 (patch) | |
tree | ba078b30d36bf8ed8d5ec8fece71871e40d85a2c /app/graphql/resolvers/issues_resolver.rb | |
parent | 29e3a08b8f8f9511dd6e25566bc9abb135a597c4 (diff) | |
download | gitlab-ce-aa7b1cfc5b3319373a4b56c755b1fc1d4cbaff02.tar.gz |
Upgrade GraphQL gem to 1.8.17
- Due to https://github.com/exAspArk/batch-loader/pull/32,
we changed BatchLoader.for into BatchLoader::GraphQL.for
- since our results are wrapped in a BatchLoader::GraphQL,
calling `sync` during authorization is required to get real object
- `graphql` now has it's own authorization system. Our
`authorized?` method conflicted and required renaming
Diffstat (limited to 'app/graphql/resolvers/issues_resolver.rb')
-rw-r--r-- | app/graphql/resolvers/issues_resolver.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/graphql/resolvers/issues_resolver.rb b/app/graphql/resolvers/issues_resolver.rb index 6988b451ec3..dd104e83f43 100644 --- a/app/graphql/resolvers/issues_resolver.rb +++ b/app/graphql/resolvers/issues_resolver.rb @@ -41,13 +41,11 @@ module Resolvers type Types::IssueType, null: true - alias_method :project, :object - def resolve(**args) # The project could have been loaded in batch by `BatchLoader`. # At this point we need the `id` of the project to query for issues, so # make sure it's loaded and not `nil` before continuing. - project.sync if project.respond_to?(:sync) + project = object.respond_to?(:sync) ? object.sync : object return Issue.none if project.nil? # Will need to be be made group & namespace aware with |