How to upload files in a GraphQL mutation nested inputs?

Viewed 130

I'm new to GraphQL and trying to figure out how to upload multiple files in a nested inputs mutation.

input PostInputs {
    id: ID!
    name: String!
    images: [ImageInputs!]!
}

input ImageInputs {
    id: ID!
    file: Upload!
    alt_name: String!
}

type Mutation {
    createPost(input: PostInputs! @spread): Post!
}

How to construct the mutation in playground?

0 Answers
Related