-
Notifications
You must be signed in to change notification settings - Fork 0
Development :: Local
Matthew Sullivan edited this page Dec 24, 2020
·
4 revisions
Install Postgres
Create database
$ createdb rjpa_test
Install dependencies and build database
$ bundle install && rails db:migrate
$ rails s
Register Mutation
mutation($input: RegisterInput!) {
register(input: $input) {
email
firstName
lastName
}
}
Query Parameters
{
"input": {
"firstName": "[FIRST_NAME]",
"lastName": "[LAST_NAME]",
"authProvider": {
"credentials": {
"email": "[EMAIL]",
"password": "[PASSWORD]"
}
}
}
}
Login Mutation
mutation ($input: LoginInput!) {
login (input: $input){
token
user {
email
firstName
lastName
}
}
}
Query Parameters
{
"input": {
"credentials": {
"email": "[EMAIL]",
"password": "[PASSWORD]"
}
}
}
UpdateUser Mutation
mutation ($input: UpdateUserInput!) {
updateUser (input: $input){
user {
email
firstName
lastName
}
}
}
Query Parameters
{
"input": {
"arguments": {
"email": "[EMAIL]",
"firstName": "[FIRST_NAME]",
"lastName": "[LAST_NAME]",
"password": "[PASSWORD]",
"token": "[JWT_TOKEN]",
}
}
}
FetchUser Query
query ($input: FetchUserInput!) {
fetchUser(input: $input) {
user {
firstName
lastName
}
}
}
Query Parameters
{
"input": {
"arguments": {
"id": "[USER_ID]",
"token": "[JWT_TOKEN]"
}
}
}