Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image 使用Graphql和apollo服务器上载图像时遇到问题_Image_Graphql_Image Uploading_Apollo Server - Fatal编程技术网

Image 使用Graphql和apollo服务器上载图像时遇到问题

Image 使用Graphql和apollo服务器上载图像时遇到问题,image,graphql,image-uploading,apollo-server,Image,Graphql,Image Uploading,Apollo Server,使用graphql上载图像时遇到问题。当我使用postman测试以下查询时,我得到一个错误(如下所示) 查询: {“查询”:“突变($file:Upload){sendImage(file:$file) },“变量”:{“文件”:null} 错误: BadRequestError:“操作”多部分字段()中的JSON无效 默认情况下,结果作为application/jsonpayload发送,但对于文件上载,您需要发出多部分请求 您可以按照此操作使用邮递员发出多部分请求 我做了同样的改变,但没有

使用graphql上载图像时遇到问题。当我使用postman测试以下查询时,我得到一个错误(如下所示)

查询:

{“查询”:“突变($file:Upload){sendImage(file:$file)
},“变量”:{“文件”:null}
错误:

BadRequestError:“操作”多部分字段()中的JSON无效


默认情况下,结果作为
application/json
payload发送,但对于文件上载,您需要发出多部分请求

您可以按照此操作使用邮递员发出多部分请求


我做了同样的改变,但没有improvement@vignesh你能分享你的多部分请求吗?我正在使用apollo服务器进行graphql