Is there any way to upload files via postman into a GraphQL API?

You can use Form-Data to do this.

Key: Operations (this is for the query / mutation )

{"query":"mutation updateAvatar($avatar:Upload!) {\n  updateAvatar(avatar: $avatar)\n}"}

Key: map ( this is to map the files to your query / mutation )

{"0": ["variables.avatar"]}

Key: 0 ( upload your image/file etc )

postman

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)