title: How do I set cache control in response headers
body: <p>How do I set cache control in response headers using <code>Apollo-Server</code>?</p>
  
  <p>I'm using Angular as FE and Graphql Module &amp; Apollo Client as BE for my application.</p>
  
  <p>Below is the response headers. I'm not sure from where this headers are applying from.</p>
  
  <p><a href="https://i.stack.imgur.com/6fXn6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6fXn6.png" alt="enter image description here"></a></p>
  
  <p>I'm wanted to set my custom headers, How do I do it ?</p>
  
  <p>Below is my sample code.</p>
  
  <pre><code>export default new ApolloServer({
    schema,
    context,
    playground: config.isDevelopment,
    uploads: {
      maxFileSize: 3000000, // 3 MB
      maxFiles: 2
    },
    cacheControl: true,
    persistedQueries: {
      cache: apolloCacheInstance
    }
  });
  </code></pre>