Skip to content

Instantly share code, notes, and snippets.

@maticzav
Created December 30, 2017 09:20
Show Gist options
  • Save maticzav/6a2234bf8fc29833345304240a2ec85e to your computer and use it in GitHub Desktop.
Save maticzav/6a2234bf8fc29833345304240a2ec85e to your computer and use it in GitHub Desktop.
# database/schema.graphql
type Mutation {
...
# takes two arguments(data and where) and returns a File
updateFile(data: FileUpdateInput!, where: FileWhereUniqueInput!): File
...
}
# Tells us which properties can be given to data
input FileUpdateInput {
name: String
size: Int
secret: String
contentType: String
url: String
}
# Tells us which properties can be given to where
input FileWhereUniqueInput {
id: ID
secret: String
url: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment