Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2019-06-03 20:38:16 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2019-06-03 22:59:25 +0300
commited503d51a39943b482e917028d589cc26ec01c95 (patch)
treee41dfcd7d63d8c69ed2ffc5f08e229589a344b9e /spec/graphql/features
parent07630b3bdf7b386b820b2b7c82ba756c46a52be6 (diff)
Expose IDs in GraphQL as a GlobalID
This exposes all fields named `id` as GlobalIDs so they can be used across our entire GraphQL implementation. When the objects loaded are `ApplicationRecord`s. We'll use our existing batchloading to find them. Otherwise, we'll fall back to the default implementation of `GlobalID`: Calling the `.find` method on the class.
Diffstat (limited to 'spec/graphql/features')
-rw-r--r--spec/graphql/features/authorization_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/graphql/features/authorization_spec.rb b/spec/graphql/features/authorization_spec.rb
index f5eb628a982..c427893f9cc 100644
--- a/spec/graphql/features/authorization_spec.rb
+++ b/spec/graphql/features/authorization_spec.rb
@@ -282,7 +282,7 @@ describe 'Gitlab::Graphql::Authorization' do
issue_ids = issue_edges.map { |issue_edge| issue_edge['node']&.fetch('id') }
expect(issue_edges.size).to eq(visible_issues.size)
- expect(issue_ids).to eq(visible_issues.map { |i| i.id.to_s })
+ expect(issue_ids).to eq(visible_issues.map { |i| i.to_global_id.to_s })
end
it 'does not check access on fields that will not be rendered' do