_examples/fileupload/schema.graphql (25 lines of code) (raw):
"The `Upload` scalar type represents a multipart file upload."
scalar Upload
"The `File` type, represents the response of uploading a file."
type File {
id: Int!
name: String!
content: String!
contentType: String!
}
"The `UploadFile` type, represents the request for uploading a file with certain payload."
input UploadFile {
id: Int!
file: Upload!
}
"The `Query` type, represents all of the entry points into our object graph."
type Query {
empty: String!
}
"The `Mutation` type, represents all updates we can make to our data."
type Mutation {
singleUpload(file: Upload!): File!
singleUploadWithPayload(req: UploadFile!): File!
multipleUpload(files: [Upload!]!): [File!]!
multipleUploadWithPayload(req: [UploadFile!]!): [File!]!
}