summaryrefslogtreecommitdiff
path: root/spec/support/graphql/fake_query_type.rb
blob: ffd851a6e6a462c03013ba89d8f047510da37e1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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