Apollo Resolver With Populate

Example 1 : Booking bookingSchema = new mongoose.Schema({ provider_id: mongoose.Types.ObjectId, service_id: mongoose.Types.ObjectId, ….. pay: [{ type: mongoose.Schema.Types.ObjectId, ref: ‘Payment’ }] }) bookingResolver Booking: { pay:catchAsync(async

GraphQL Intro 2

Why use GraphQL ? Getting Started With GraphQL.js Running an Express GraphQL Server GraphQL – Schemas and Types What is the difference between apollo server

JWT With Apollo

1. install –save jsonwebtoken 2. import {sign} from ‘jsonwebtoken’ 3. login ()=> { const user = await User.findOne(email:email); const valid = await bcrypt.compare(password, user.password) const