add relay environment
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
module Types
|
||||
class QueryType < Types::BaseObject
|
||||
# Add `node(id: ID!) and `nodes(ids: [ID!]!)`
|
||||
include GraphQL::Types::Relay::HasNodeField
|
||||
include GraphQL::Types::Relay::HasNodesField
|
||||
|
||||
# Add root-level fields here.
|
||||
# They will be entry points for queries on your schema.
|
||||
|
||||
# TODO: remove me
|
||||
field :test_field, String, null: false,
|
||||
field :test_field, [String], null: false,
|
||||
description: "An example field added by the generator"
|
||||
def test_field
|
||||
context[:current_user].email
|
||||
[
|
||||
SecureRandom.uuid,
|
||||
SecureRandom.uuid,
|
||||
]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user