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:
authorNick Thomas <nick@gitlab.com>2017-08-16 16:04:41 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-06-05 21:47:42 +0300
commit9c6c17cbcdb8bf8185fc1b873dcfd08f723e4df5 (patch)
tree624dba30e87ed0ea39afa0535d92c37c7718daef /spec/graphql/gitlab_schema_spec.rb
parent67dc43db2f30095cce7fe01d7f475d084be936e8 (diff)
Add a minimal GraphQL API
Diffstat (limited to 'spec/graphql/gitlab_schema_spec.rb')
-rw-r--r--spec/graphql/gitlab_schema_spec.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/graphql/gitlab_schema_spec.rb b/spec/graphql/gitlab_schema_spec.rb
new file mode 100644
index 00000000000..3582f297866
--- /dev/null
+++ b/spec/graphql/gitlab_schema_spec.rb
@@ -0,0 +1,27 @@
+require 'spec_helper'
+
+describe GitlabSchema do
+ it 'uses batch loading' do
+ expect(described_class.instrumenters[:multiplex]).to include(GraphQL::Batch::SetupMultiplex)
+ end
+
+ it 'enables the preload instrumenter' do
+ expect(field_instrumenters).to include(instance_of(::GraphQL::Preload::Instrument))
+ end
+
+ it 'enables the authorization instrumenter' do
+ expect(field_instrumenters).to include(instance_of(::Gitlab::Graphql::Authorize))
+ end
+
+ it 'has the base mutation' do
+ expect(described_class.mutation).to eq(::Types::MutationType)
+ end
+
+ it 'has the base query' do
+ expect(described_class.query).to eq(::Types::QueryType)
+ end
+
+ def field_instrumenters
+ described_class.instrumenters[:field]
+ end
+end