Skip to content
Rakinur Alam edited this page Aug 29, 2019 · 1 revision

Sign Up

mutation {
  signUp(
    email: "test@test.com"
    password: "12345678"
    firstName: "graphql"
    lastName: "go"
  ) {
    ok
    error
    user {
      id
      email
      firstName
      lastName
      bio
      avatar
      createdAt
      updatedAt
    }
  }
}

Sign In

mutation {
  signIn(email: "test@test.com", password: "12345678") {
    ok
    error
    token
  }
}

Change a Password

mutation {
  changePassword(password: "87654321") {
    ok
    error
    user {
      id
      email
      firstName
      lastName
      bio
      avatar
      createdAt
      updatedAt
    }
  }
}

Change a Profile

mutation {
  changeProfile(bio: "Go developer", avatar: "go-developer.png") {
    ok
    error
    user {
      id
      email
      firstName
      lastName
      bio
      avatar
      createdAt
      updatedAt
    }
  }
}

Get my profile

query {
  getMyProfile {
    ok
    error
    user {
      id
      email
      firstName
      lastName
      bio
      avatar
      createdAt
      updatedAt
    }
  }
}

Clone this wiki locally

⌂ 换网址