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>2018-05-23 10:55:14 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-06-06 11:58:54 +0300
commit9b65d4bb417fb4939289eab94487c894f0a62db6 (patch)
tree1f97b9a1bd0d722a3c3ff4e89ec13bdb7a3aec00 /spec/graphql/gitlab_schema_spec.rb
parentc443133e779c4c508b9c6429dd4ba623d64f03f1 (diff)
Initial setup GraphQL using graphql-ruby 1.8
- All definitions have been replaced by classes: http://graphql-ruby.org/schema/class_based_api.html - Authorization & Presentation have been refactored to work in the class based system - Loaders have been replaced by resolvers - Times are now coersed as ISO 8601
Diffstat (limited to 'spec/graphql/gitlab_schema_spec.rb')
-rw-r--r--spec/graphql/gitlab_schema_spec.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/spec/graphql/gitlab_schema_spec.rb b/spec/graphql/gitlab_schema_spec.rb
index f25cc2fd6c9..b892f6b44ed 100644
--- a/spec/graphql/gitlab_schema_spec.rb
+++ b/spec/graphql/gitlab_schema_spec.rb
@@ -6,26 +6,25 @@ describe GitlabSchema do
end
it 'enables the preload instrumenter' do
- expect(field_instrumenters).to include(instance_of(::GraphQL::Preload::Instrument))
+ expect(field_instrumenters).to include(BatchLoader::GraphQL)
end
it 'enables the authorization instrumenter' do
- expect(field_instrumenters).to include(instance_of(::Gitlab::Graphql::Authorize))
+ expect(field_instrumenters).to include(instance_of(::Gitlab::Graphql::Authorize::Instrumentation))
end
it 'enables using presenters' do
- expect(field_instrumenters).to include(instance_of(::Gitlab::Graphql::Present))
+ expect(field_instrumenters).to include(instance_of(::Gitlab::Graphql::Present::Instrumentation))
end
it 'has the base mutation' do
- pending <<~REASON
- Having empty mutations breaks the automatic documentation in Graphiql, so removed for now."
- REASON
- expect(described_class.mutation).to eq(::Types::MutationType)
+ pending('Adding an empty mutation breaks the documentation explorer')
+
+ expect(described_class.mutation).to eq(::Types::MutationType.to_graphql)
end
it 'has the base query' do
- expect(described_class.query).to eq(::Types::QueryType)
+ expect(described_class.query).to eq(::Types::QueryType.to_graphql)
end
def field_instrumenters