https://prefect.io logo
Title
e

Enda Peng

04/22/2021, 10:57 PM
I get so confused by how the
graphql
works. Here is my operations • First I try
prefect server config > origin.yml
then launch it with docker-compose. App works on
localhost:8080
• Under
getting started
tab, I put
<http://localhost:4200/graphql>
as graphql end point and it works. So far so good • Then I try
prefect server config --graphql-port 40002 > my-prefect.yml
, launch with docker composer. App still works on the same address • However, I tried to give ui the graphql endpoint with values
<http://localhost:4200/graphql>, <http://localhost:40002/graphql>, <http://graphql:40002/>, <http://localhost:40002/>
with/without last
/
. None of them works. I try in browser
<http://localhost:40002/graphql/>
, it gives me a console to play. As long as I touched graphql port, I will not be able to set up a workable local sever. Really appreciate if someone can help me take a look
n

nicholas

04/22/2021, 11:00 PM
Hi @Enda Peng - the problem here is that the UI doesn't need the GraphQL port, it needs the Apollo port; Apollo is a service that sits in front of GraphQL and is the main entry point for external clients.
So in what you've linked the Apollo is still at port 4200, and GraphQL is at 40002 instead of 4201.
e

Enda Peng

04/22/2021, 11:06 PM
I get the point here, let me try one more time
It doesn’t work for me. I tried twice, first time, I don’t touch anything.
GRAPHQL_SERVICE_HOST: <http://graphql>
      GRAPHQL_SERVICE_PORT: 4201
      HASURA_API_URL: <http://hasura:3000/v1alpha1/graphql>
      PREFECT_API_HEALTH_URL: <http://graphql:40002/health>
      PREFECT_API_URL: <http://graphql:40002/graphql/>
      PREFECT_SERVER__TELEMETRY__ENABLED: "true"
I put
<http://localhost:4200/graphql>
on the webpage, it doesn’t work. Then I think the second line look suspicious. So I use
GRAPHQL_SERVICE_HOST: <http://graphql>
      GRAPHQL_SERVICE_PORT: 40002
      HASURA_API_URL: <http://hasura:3000/v1alpha1/graphql>
      PREFECT_API_HEALTH_URL: <http://graphql:40002/health>
      PREFECT_API_URL: <http://graphql:40002/graphql/>
      PREFECT_SERVER__TELEMETRY__ENABLED: "true"
Also
<http://localhost:4200/graphql>
doesn’t work on web app