Getting 405 error when calling graphql from JS
See original GitHub issueI installed corsheaders, and set to allow all. But I’m still getting the error. I’m using isomorphic-fetch but I guess the error would appear regardless.
INSTALLED_APPS = [
...
'corsheaders',
]
CORS_ORIGIN_ALLOW_ALL = True
Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
:8000/#/repos/facebook/react?_k=d4wsv1:1
Fetch API cannot load http://localhost:8000/graphql. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8000' is therefore not allowed access. The response had HTTP status code 405. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Getting 405 error, Node Js - Method not found - Stack Overflow
I am trying to run a server in node js, its actually a GraphQL server. I am just calling the ...
Read more >How to Fix the HTTP 405 Method Not Allowed Error - Kinsta®
It's an HTTP response status code that indicates that the request method is known by the server but is not supported by the...
Read more >Why your Website is giving an HTTP 405 Method Not Allowed ...
The HTTP 405 Method Not Allowed occurs when the client sends a request to the server, and the server understands the request but...
Read more >405 Method Not Allowed - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 405 Method Not Allowed response status code indicates that the server knows the request method, ...
Read more >Error handling - Apollo GraphQL Docs
If a request uses an invalid HTTP method ( GET with a mutation, or any HTTP method other than GET or POST ),...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This SO answer solved it. http://stackoverflow.com/questions/43869303/django-returns-403-error-on-post-request-with-fetch/
No, should I? I want my graphiql to still work. Anyway I tried but still the same.