anmonteiro / anmonteiro/reason-graphql-fullstack

Client - server port issue

Offen
#11 6 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
OCaml
Sterne
245
Forks
18
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Trivial question: (BTW, very nice project, this helps me a lot)

I see the the sample client tries to connect to http://localhost/public which is not where the server is located.

I tried changing the line in Loader.re to:

```
let sendQuery = q =>
Bs_fetch.(
fetchWithInit(
"http://localhost:8080/graphql",
RequestInit.make(
```

But my newbie knowledge of Bs_fetch is obviously flawed. Fidder reports that this is what is being sent:

```
OPTIONS http://localhost:8080/graphql HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Access-Control-Request-Method: POST
Origin: http://127.0.0.1:5500
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36
Access-Control-Request-Headers: content-type
Accept: */*
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Referer: http://127.0.0.1:5500/public/index.html
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,he;q=0.8,yi;q=0.7

```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.