【发布时间】:2020-05-29 05:55:05
【问题描述】:
我使用https://pub.dev/packages/graphql_flutter 包上传照片。它运行良好,但在升级软件包后,它崩溃了。错误
I/flutter (12390): GraphQL Errors:
I/flutter (12390): Variable "$uploadPhoto" got invalid value {};
Expected type Upload. Upload value invalid.: Undefined location
另外,也许是后端的问题 Node js code
或者可能是 Flutter 方面的问题 Flutter code 我用https://pub.dev/packages/multi_image_picker
变异
mutation (
$uploadPhoto:Upload
$childServiceIds: [String!]
$executors: [String!]
$institutionId: String!
$description:String!
$price: Float!
$name:String!
){
createService(
institutionId: $institutionId
description: $description
iconImage: $uploadPhoto
name: $name
price: $price
token:""
childServiceIds: $childServiceIds
executors: $executors
){
services{
_id
name
price
description
childServiceIds
iconLogoUrl
}
}
}
【问题讨论】:
标签: node.js express flutter graphql apollo-server