diff options
Diffstat (limited to 'spec/support/graphql/fake_query_type.rb')
-rw-r--r-- | spec/support/graphql/fake_query_type.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/support/graphql/fake_query_type.rb b/spec/support/graphql/fake_query_type.rb new file mode 100644 index 00000000000..ffd851a6e6a --- /dev/null +++ b/spec/support/graphql/fake_query_type.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Graphql + class FakeQueryType < Types::BaseObject + graphql_name 'FakeQuery' + + field :hello_world, String, null: true do + argument :message, String, required: false + end + + def hello_world(message: "world") + "Hello #{message}!" + end + end +end |