Comments (6)
The app should load in localhost:8080
from reason-graphql-fullstack.
I am not trying to be dense. (at least not deliberately, but I don't mind if you call me names :-) )
The server is starting in localhost:8080. I can see the graphiql interface, I can use insomnia to call against it, etc. and the mutations and queries all work fine.
I also see that when I edited line in Loader.re (in the client) as shown above - the server is logging to the console "/graphql" when the message arrives. (so there is connectivity).
What I did notice in with Fiddler is that post request packet had no body after I modified Loader.re
If I leave it (loader.re) alone, it does have a body, but then it sends the request to http://localhost/public/graphql (where there is no server)
So I think I am not editing Loader.re in the React client properly.
from reason-graphql-fullstack.
I don't know what to tell you. I haven't touched this app in a while and it worked when I pushed it.
I'd encourage others to chime in if it's not working for them. I don't use Esy anymore so I can't double check if the setup works.
from reason-graphql-fullstack.
So let me chime in this:
- As far as I can tell the issue is purely a simple issue on the client side (not esy build, yarn built)
- The sample client uses fetchWithInit , with a first argument of "/graphql"
- that results in a call with no port,
- How does one modify the fetchWithInit to use a full url. (probably a question for someone in the https://github.com/reasonml-community/bs-fetch community. melange-community/melange-fetch#30
from reason-graphql-fullstack.
@anmonteiro you mention you no longer use Esy, What was the problem, and what do you use now?
from reason-graphql-fullstack.
I found the problem. It is simple there is no header on the server to deal with the CORS issue:
Access to fetch at 'http://localhost:8080/graphql' from origin 'http://127.0.0.1:5500' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Do you know who I should ask about how to add header on the responses for CORS" is it Cohttp_lwt_unix or Cohttp_lwt_unix.Server
from reason-graphql-fullstack.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reason-graphql-fullstack.