Skip to content
No description, website, or topics provided.
JavaScript HTML CSS
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api Add graphql-local and facebook strategy Aug 2, 2019
public Initial commit from Create React App Jun 17, 2019
src Remove unnecessary files and updated package.json Jun 17, 2019
.gitignore Add graphql-local and facebook strategy Aug 2, 2019
README.md Add graphql-local and facebook strategy Aug 2, 2019
package-lock.json
package.json Add graphql-local and facebook strategy Aug 2, 2019
yarn.lock Initial commit from Create React App Jun 17, 2019

README.md

This project was set up using create-react-app. All client side code resides in the /src folder. You can find the code for the GraphQL API inside the /api directory.

Articles of this series

Introduction and implementation of dummy API

Authentication with credentials using GraphQL and Passport

Facebook login with GraphQL and Passport

Apollo-React app for authentication with GraphQL and Passport (coming soon)

How to install and run the project

To install and start the app run following commands.

npm install
npm start

Visit http://localhost:4000/graphql. You will see the Apollo playground. There you can run following query and mutation

mutation {
  login(email: "maurice@moss.com", password: "abcdefg") {
    user {
      id
      firstName
      lastName
      email
    }
  }
}

mutation {
  signup(
    firstName: "Jen",
    lastName: "Barber",
    email: "jen@barber.com",
    password: "qwerty"
  ) {
    user {
      id
      firstName
      lastName
      email
    }
  }
}

query {
  currentUser {
    id
    firstName
    lastName
    email
  }
}

mutation {
  logout
}
You can’t perform that action at this time.