diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 16:37:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 16:37:47 +0300 |
commit | aee0a117a889461ce8ced6fcf73207fe017f1d99 (patch) | |
tree | 891d9ef189227a8445d83f35c1b0fc99573f4380 /spec/support/graphql | |
parent | 8d46af3258650d305f53b819eabf7ab18d22f59e (diff) |
Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42
Diffstat (limited to 'spec/support/graphql')
-rw-r--r-- | spec/support/graphql/fake_query_type.rb | 9 | ||||
-rw-r--r-- | spec/support/graphql/field_inspection.rb | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/spec/support/graphql/fake_query_type.rb b/spec/support/graphql/fake_query_type.rb index ffd851a6e6a..18cf2cf3e82 100644 --- a/spec/support/graphql/fake_query_type.rb +++ b/spec/support/graphql/fake_query_type.rb @@ -1,15 +1,22 @@ # frozen_string_literal: true +require 'graphql' module Graphql - class FakeQueryType < Types::BaseObject + class FakeQueryType < ::GraphQL::Schema::Object graphql_name 'FakeQuery' field :hello_world, String, null: true do argument :message, String, required: false end + field :breaking_field, String, null: true + def hello_world(message: "world") "Hello #{message}!" end + + def breaking_field + raise "This field is supposed to break" + end end end diff --git a/spec/support/graphql/field_inspection.rb b/spec/support/graphql/field_inspection.rb index f39ba751141..e5fe37ec555 100644 --- a/spec/support/graphql/field_inspection.rb +++ b/spec/support/graphql/field_inspection.rb @@ -22,7 +22,7 @@ module Graphql @type ||= begin field_type = @field.type.respond_to?(:to_graphql) ? @field.type.to_graphql : @field.type - # The type could be nested. For example `[GraphQL::STRING_TYPE]`: + # The type could be nested. For example `[GraphQL::Types::String]`: # - List # - String! # - String |