diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-07 03:08:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-07 03:08:58 +0300 |
commit | b45d30ab76e55c9e2889263c7a29de5a48d6ec56 (patch) | |
tree | b9a34518887b942af58673318c6478d144ddde2d /app/graphql/gitlab_schema.rb | |
parent | 63c5b4906b330d3ad4100446d149eaf6f65e6d82 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql/gitlab_schema.rb')
-rw-r--r-- | app/graphql/gitlab_schema.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/graphql/gitlab_schema.rb b/app/graphql/gitlab_schema.rb index b1f2ffb8503..d66a2333d11 100644 --- a/app/graphql/gitlab_schema.rb +++ b/app/graphql/gitlab_schema.rb @@ -78,6 +78,13 @@ class GitlabSchema < GraphQL::Schema find_by_gid(gid) end + def resolve_type(type, object, ctx = :__undefined__) + tc = type.metadata[:type_class] + return if tc.respond_to?(:assignable?) && !tc.assignable?(object) + + super + end + # Find an object by looking it up from its 'GlobalID'. # # * For `ApplicationRecord`s, this is equivalent to |