Skip to content

dushmantha/Grocery-api

Repository files navigation

buckshee-endpont-auth

there are two function implemeted in this end-point and it can be tested on localhost

End point function for

  • Create user
  • Login user

Mutation

mutation {
  createUser(
    name: "tharjaa",
    email: "[email protected]",
    password: "dssssdfdd"
  ) {
    _id
    name
    email
  }
}

result :

{
  "data": {
    "createUser": {
      "_id": "5ec62799751c5564c7966995",
      "name": "tharjaa",
      "email": "[email protected]"
    }
  }
}

query

{
  login(email:"[email protected]",password:"dssssdfdd"){
    token
    userId
  }
}

result :

{
  "data": {
    "login": {
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1ZWM1ZjMzNGYzOTdkODUyNjAwMWVkMmYiLCJlbWFpbCI6ImRkZmRzc2RmcWFhQHNkczAuY29tIiwiaWF0IjoxNTkwMDQyNzUxLCJleHAiOjE1OTAwNDYzNTF9.fjnNnCev3loejL6nzTpXOcVxo6vzFFHrUFBAJ4utwhs",
      "userId": "5ec5f334f397d8526001ed2f"
    }
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors