mirror of
https://github.com/evgen-app/evgen-app-front-template.git
synced 2024-11-28 18:03:43 +03:00
30 lines
524 B
GraphQL
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
|
|
}
|
|
} |