-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORS problem ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH #2
Comments
Hey, I use both queries and mutation without any errors. Do you mind sharing how to reproduce this error so I can take a closer look at it? |
Hi, With graphiQL it's work well, but in my react APP, it's not working. My schema is :
In my resolver :
My server running on 127.0.0..1:3333/graphql and my react APP on 127.0.0.1:3000 |
You will have to enable CORS on the GraphQL server. Set |
Hi have recreate demo project if you want reproduce my bug : my |
Hey, I just tried my own graphql server with a Vue app using Apollo client. Everything works fine both queries and mutations. All I had to do was enable CORS. I will take a look at your code but I'm not that confident with React. |
Humm I tryed with express and express-apollo-server and it's worked. |
Having same issue here. The queries work fine but mutations are failing. The mutation actually works when i run it in: But the POST method seems to be is failing from the apollo client in the React Component . I'm using Adonis4 my origin is in true in the cors.js file. Route.route('/graphql', ({ request, response }) => { best regards. |
Uhmm weird, ok I think i see what's causing this, @JeremyGreaux maybe this helps you. I have this mutation that create notes: But in my Mutation (schema) definition i have this, (schemas.js) Once i changed my React code and removed my user_id the code started working again. const NOTE_MUTATION = gql Best regards. |
Hi,
I use adonis-apollo-server(^1.0.2) extension to create my own graphQL api.
Query request works fine, but when I use Mutation query, I have got this request error:
POST http://localhost:3333/graphql net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH ApolloError.js:34 Uncaught (in promise) Error: Network error: Failed to fetch at new ApolloError (ApolloError.js:34) at Object.error (QueryManager.js:122) at SubscriptionObserver.error (zen-observable.js:174) at httpLink.js:147 at
I tryed to change cors configs, but no changes.
With another graphQL API (express), I have not this error.
Thx for helping
The text was updated successfully, but these errors were encountered: