How Azure AD B2C can authenticate with GraphQL (Apollo Server) API and ReactJs

In the Microsoft documentation there is a sample react app is authenticating with nodejs (express js REST API) link is here Configure authentication in a sample React SPA by using Azure Active Directory B2C | Microsoft Docs
but there is nothing written about react App with Nodejs (GraphQL-Apollo Server) API authentication. Please help me as i want to apply authentication same as written in the documentation for REACT -NODEJS(but with graphQL-Apollo Server) but there is no clue on the internet about it.

Below is my INDEX.JS file for REST API, anyone can tell me how to add these configurations in Apollo Server -GraphQL

const express = require(‘express’);
const morgan = require(‘morgan’);
const passport = require(‘passport’);
const config = require(‘./config.json’);

const BearerStrategy = require(‘passport-azure-ad’).BearerStrategy;

const options = {
identityMetadata: https://${config.metadata.b2cDomain}/${config.credentials.tenantName}/${config.policies.policyName}/${config.metadata.version}/${config.metadata.discovery},
clientID: config.credentials.clientID,
audience: config.credentials.clientID,
policyName: config.policies.policyName,
isB2C: config.settings.isB2C,
validateIssuer: config.settings.validateIssuer,
loggingLevel: config.settings.loggingLevel,
passReqToCallback: config.settings.passReqToCallback,
scope: config.protectedRoutes.hello.scopes

const bearerStrategy = new BearerStrategy(options, (token, done) => {
// Send user info using the second argument
done(null, { }, token);

const app = express();




//enable CORS (for testing only -remove in production/deployment)
app.use((req, res, next) => {
res.header(‘Access-Control-Allow-Origin’, ‘*’);
res.header(‘Access-Control-Allow-Headers’, ‘Authorization, Origin, X-Requested-With, Content-Type, Accept’);

// exposed API endpoint
passport.authenticate(‘oauth-bearer’, {session: false}),
(req, res) => {
console.log('Validated claims: ', req.authInfo)
console.log(“hello jamal”)

    // Service relies on the name claim.  
        'name': req.authInfo['name'],
        'issued-by': req.authInfo['iss'],
        'issued-for': req.authInfo['aud'],
        'scope': req.authInfo['scp']


const port = process.env.PORT || 5000;

app.listen(port, () => {
console.log('Listening on port ’ + port);

module.exports = app;