【发布时间】:2020-01-30 10:05:56
【问题描述】:
使用 graphql 上传图片时遇到问题。当我使用邮递员测试以下查询时,出现错误(如下所示)。
查询:
{"query":"mutation($file: Upload) {sendImage(file: $file)
}","variables":{"file":null}}
错误:
BadRequestError:“操作”多部分字段 (https://github.com/jaydenseric/graphql-multipart-request-spec) 中的 JSON 无效。
【问题讨论】:
-
我正在为 graphql 使用 apollo-server
标签: image graphql image-uploading apollo-server