An Express graphql Boilerplate template with initial graphql setup
- JWT Authentication with graphql
- Query and mutation for user and JWT authentication
- Role based access using graphql directive
## Query:
Users: [User]
User(email:String): User
Tests
Test(name: String!)
## Mutation:
register(userInput: UserInput!)
login(email:String!,password:String!)
createUser(userInput: UserInput)
updateUser(id: String!,userInput: UserInput)
addTest(name: String)
updateTest(id:String,name: String)
## Directive:
@isAuthenticated
@hasRoleOf(role:String)
- If you need to add any schemas or resolvers use the file format "name.graphql" for schema in schema folder and "name.resolvers.js" for resolvers in resolvers folder. Added schemas and resolvers will be added automatically in the Express app.
- A node interface has been Provided to Implement createdAt and updatedAt
Copy .env.example to .env and setup your Database information.
# install dependencies
yarn
# serve at localhost:4000
yarn start