Introduction
Logging In
mutation loginUser($input: LoginInput!) {
loginUser(input: $input) {
session {
token
exp
}
}
}{
"input": {
"email": "[email protected]",
"password": "my_password"
}
}{
"data": {
"loginUser": {
"session": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3OWYxNDAwOS1jZDlmLTU2ZDMtYmYyMi1lOGQyNWFlMDIyZDMiLCJleHAiOjE2NjczMjMxNjksImlhdCI6MTY2NzIzNjc2OX0.IxaANmlrDQY2BK1rbEoY-5ET_a9AxwyUJMHFkIVRWts",
"exp": 1667323169
}
}
}
}curl -X POST https://example.native-x.parameter1.com/graph \
-H 'authorization: Bearer <mytoken>' \
-H 'content-type: application/json' \
-d '{"query":"query { allUsers { totalCount } }"}'
# Response: { "data": { "allUsers": { "totalCount": 17 } } }Last updated