Dukuo
11/19/2017, 8:33 PMdaniele
11/19/2017, 8:44 PMdaniele
11/19/2017, 8:44 PMdaniele
11/19/2017, 8:44 PMdaniele
11/19/2017, 8:44 PMDukuo
11/19/2017, 8:49 PMDukuo
11/19/2017, 8:49 PMDukuo
11/19/2017, 8:49 PMdaniele
11/19/2017, 8:51 PMAuthentication
query?daniele
11/19/2017, 8:51 PMdaniele
11/19/2017, 8:51 PMmutation {
createPost(
description: "Great sunset"
imageUrl: "<http://example.org/sunset.png>"
authorId: "cja78afsqjqd40156aeea8prj" # replace with the `id` of the `User` you created before
) {
id
}
}
daniele
11/19/2017, 8:52 PMAuthorization
and the tokenDukuo
11/19/2017, 8:57 PMdaniele
11/19/2017, 8:57 PMDukuo
11/19/2017, 8:57 PMDukuo
11/19/2017, 8:57 PMdaniele
11/19/2017, 8:57 PMDukuo
11/19/2017, 8:57 PMdaniele
11/19/2017, 8:58 PMmutation {
authenticateUser(email: "<mailto:dd@dd.com|dd@dd.com>", password: "dd"){
token
}
}
Dukuo
11/19/2017, 8:58 PMDukuo
11/19/2017, 8:58 PMDukuo
11/19/2017, 8:58 PMmutation createUser {
createUser(
role:ADMIN
email:"<mailto:asdasd@asd.com|asdasd@asd.com>"
password:"asdad"
) {
id
}
}
daniele
11/19/2017, 8:58 PMDukuo
11/19/2017, 8:58 PM{
"data": {
"createUser": null
},
"errors": [
{
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"createUser"
],
"code": 3008,
"message": "Insufficient permissions for this mutation",
"requestId": "eu-west-1:simple:cja78rucwjvqq0156y72u7oh6"
}
]
}
Dukuo
11/19/2017, 8:58 PMDukuo
11/19/2017, 8:59 PMDukuo
11/19/2017, 8:59 PMcreate
permission setdaniele
11/19/2017, 8:59 PMmutation {
signupUser(
email: "alice@graph.cool"
password: "graphql"
admin: true
) {
id
token
}
}
Dukuo
11/19/2017, 8:59 PMdaniele
11/19/2017, 9:00 PM