apollo-client does not work with CORS

后端 未结 4 663
北恋
北恋 2021-02-07 14:44

I am writing a graphql server component on AWS Lambda (NOT using graphql-server). On the client side I\'m using apollo-client. On the response of the lambda function I\'m sett

4条回答
  •  不思量自难忘°
    2021-02-07 15:27

    I'd assume you're using the AWS API Gateway.

    One question for you is: have you enabled CORS for your gateway? See how

    I believe that should solve your issues, if you're also sending cookies, you can also set the "Access-Control-Allow-Credentials" : true header as well. `

提交回复
热议问题