evgen-app-front-template/regSchema.graphql
2021-04-24 13:58:03 +03:00

30 lines
524 B
GraphQL

mutation auth($username:String!, $password:String!){
tokenAuth(username:$username, password:$password){
token
}
}
mutation register($username:String!, $password:String!){
createUser(username:$username, password:$password){
ok
}
}
query getMaterials($token: String){
materialsByUser(token:$token){
content
id
}
}
mutation UpdateDoc($id:ID, $content:String){
updateDoc(content:$content, id:$id){
ok
}
}
query getMaterialByID($id:ID!){
material(id:$id){
content
}
}