title: Enable CORS origin graphql
body: <p>I'm working on graphQL and spring boot project. The API works well using graphiQL but when trying to consume it using Apollo vueJS, it causes CORS origin error.  </p>
  
  <p>I'm using   @CrossOrigin annotation in ProductQuery class which implements GraphQLQueryResolver like  below: </p>
  
  <pre><code> @CrossOrigin(origins = "https://localhost:8081")
  public List&lt;Product&gt; getProducts(){return this.productService.findAll(); } 
  </code></pre>
  
  <p>Here is the  error displayed on frontEnd project: 
  <a href="https://i.stack.imgur.com/GL5nD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GL5nD.png" alt="CORS origin error"></a></p>
  
  <p>I appreciate your help. </p>