title: How to access the request object inside a GraphQL resolver (using Apollo-Server-Express)
body: <p>I have a standard express server using GraphQL</p>
  
  <pre><code>const server = express();
  
  server.use('/graphql', bodyParser.json(), graphqlExpress({ schema }));
  </code></pre>
  
  <p>Question is: how can I access the <code>request</code> object inside a resolver? I want to check the JWT in some specific queries</p>
  
  <p>Here is the imported schema:</p>
  
  <pre><code>const typeDefs = `
      type User {
          id: String,
          name: String,
          role: Int
      }
      type Query {
          user(id: String): User,
          users: [User]
      }
  `;
  
  const resolvers = {
      Query: {
          user: (_, args, context, info) =&gt; users.find(u =&gt; u.id === args.id),
          users: (_, args, context, info) =&gt; users
      }
  }
  
  module.exports = makeExecutableSchema({typeDefs, resolvers});
  </code></pre>