I am trying to use Postman to upload a file to GraphQL.
I know how I can upload a file, however, in my mutation I have to pass a String!
together with the Upload!
.
I am not sure where I can pass this String!
in Postman.
My mutation:
mutation AddBookImageOne($bookId: string, $bookImageOne: Upload!){
addBookImageOne(bookId: $bookId, bookImageOne: $bookImageOne)
}
I tried to pass bookId
in the variables
key but I keep getting the error:
"message": "Variable "$bookId" of required type "String!" was not provided.",
I checked this: Graphql mutation to upload file with other fields but they use CURL
"Operations" in postman field is:
{"query":"mutation AddBookImageOne($bookId: String!, $bookImageOne: Upload!){\n addBookImageOne(bookId: $bookId, bookImageOne: $bookImageOne)\n}"}
operations
arg - stackoverflow.com/a/62683397/6124657 – xadm