You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi in my query value returned is one object Project.find(id)
This schema return one error
Failed to build a GraphQL list result for field Project.Itemsat pathproject.items.\nExpected #<BatchLoader::GraphQL:0x000055f6101402b0 @batch_loader=#BatchLoader:0x62120>(BatchLoader::GraphQL) to implement.eachto satisfy the GraphQL return type[Item!].\n"
field :items, [Types::ItemType], null: true
def items
BatchLoader::GraphQL.for(object.id).batch(default_value: []) do |project_ids, loader|
Item.where(project_id: project_ids).each do |data|
loader.call(data.project_id) { |memo| memo << data }
end
end
end
One ideia?
The text was updated successfully, but these errors were encountered:
Hi in my query value returned is one object
Project.find(id)
This schema return one error
Failed to build a GraphQL list result for field
Project.Itemsat path
project.items.\nExpected
#<BatchLoader::GraphQL:0x000055f6101402b0 @batch_loader=#BatchLoader:0x62120>(BatchLoader::GraphQL) to implement
.eachto satisfy the GraphQL return type
[Item!].\n"
field :items, [Types::ItemType], null: true
def items
BatchLoader::GraphQL.for(object.id).batch(default_value: []) do |project_ids, loader|
Item.where(project_id: project_ids).each do |data|
loader.call(data.project_id) { |memo| memo << data }
end
end
end
One ideia?
The text was updated successfully, but these errors were encountered: