Last active
October 3, 2020 13:47
-
-
Save maticzav/da5aeabacc5679dda1fc473f6a405c9b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# src/schema.graphql | |
# import ID, File from "./generated/database.graphql" | |
# Everything user can read | |
type Query { | |
file(id: ID!): File # Takes id property as an argument and returns a File | |
files: [File!]! # Returns every file stored | |
} | |
# Everthing user can change | |
type Mutation { | |
renameFile( | |
id: ID! # An ID of the file to be changed | |
name: String! # A new name of the file | |
): File | |
deleteFile( | |
id: ID! # Id of the file to be deleted | |
): File | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment