目前,我在react-navie中使用apollo-client,并使用strapi作为后端。我尝试使用apollo客户端将ImageCropPicker获得的图像上传到服务器,但总是显示“不支持‘上传’标量序列化”。错误。有没有人知道怎么修?
发布于 2020-11-06 17:41:41
export const UploadScalar = new GraphQLScalarType({
name: 'Upload',
description: 'The `Upload` scalar type represents a file upload.',
parseValue(value: any) {
return value
},
serialize(value: any) {
return value
},
parseLiteral(ast) {
throw new Error('‘Upload’ scalar literal unsupported.')
},
})https://stackoverflow.com/questions/64711933
复制相似问题