AD
Size: a a a
AD
AD
AD
IM
IM
AD
IM
AD
AD
class QueryType < GraphQL::Schema::Object
description "The query root of this schema"
# First describe the field signature:
field :post, PostType, null: true do
description "Find a post by ID"
argument :id, ID, required: true
end
# Then provide an implementation:
def post(id:)
Post.find(id)
end
end
IM
def post
AD
def post
AD
IM
AD
class QueryType < GraphQL::Schema::Object
description "The query root of this schema"
# First describe the field signature:
field :post, PostType, null: true do
description "Find a post by ID"
argument :id, ID, required: true
end
# Then provide an implementation:
def post(id:)
Post.find(id)
end
end
IM
AD
IM
field
есть поле для указания резолвера в виде прока или в виде классаIM