9b65d4bb41
- 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
13 lines
291 B
Ruby
13 lines
291 B
Ruby
module Functions
|
|
class Echo < BaseFunction
|
|
argument :text, GraphQL::STRING_TYPE
|
|
|
|
description "Testing endpoint to validate the API with"
|
|
|
|
def call(obj, args, ctx)
|
|
username = ctx[:current_user]&.username
|
|
|
|
"#{username.inspect} says: #{args[:text]}"
|
|
end
|
|
end
|
|
end
|