mirror of
https://github.com/evgen-app/evgen-app-front-template.git
synced 2025-02-21 20:50:35 +03:00
45 lines
1.0 KiB
GraphQL
45 lines
1.0 KiB
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){
|
|
name
|
|
state
|
|
content
|
|
id
|
|
}
|
|
}
|
|
mutation UpdateDoc($id:ID, $content:String, $name:String, $state:String){
|
|
updateDoc(content:$content, id:$id, name:$name, state:$state){
|
|
ok
|
|
}
|
|
}
|
|
mutation DeleteDoc($id:ID){
|
|
deleteDoc(id:$id){
|
|
ok
|
|
}
|
|
}
|
|
|
|
query getMaterialByID($id:ID!){
|
|
material(id:$id){
|
|
name
|
|
state
|
|
}
|
|
}
|
|
|
|
mutation CreateDoc($token: String, $name:String){
|
|
createDoc(token:$token, content:"Это новый документ!",name:$name, state:"{\"blocks\":[{\"key\":\"637gr\",\"text\":\"Это новый документ!\",\"type\":\"unstyled\",\"depth\":0,\"inlineStyleRanges\":[],\"entityRanges\":[],\"data\":{}}],\"entityMap\":{}}"){
|
|
document{
|
|
id
|
|
}
|
|
}
|
|
} |