Where in the prisma setup do you assign what the l...
# orm-help
a
Where in the prisma setup do you assign what the local host will be? Or the Url
a
What are you talking about?
url of what?
a
like how does it know to default to localhost:4000
for playground
z
you configure that in your host, like docker-compose.yml
port: -"4000:4000"
then you tell graphql server where to find prisma endpoint
http://localhost never worked for me
a
hmm I don’t have it setup that way I actually have 5566:5566 but it still opens in localhost:4000. I thought that maybe in here:
Copy code
projects:
  app:
    schemaPath: src/schema.graphql
    extensions:
      endpoints:
        default: <http://localhost:4000>
but no luck
z
on my local machine I had that localhost:3000
but to tell you honestly I find the .graphqlconfig.yml a mystery since it is af is it isn't used by the graphql server at all
you might want to check this https://github.com/prisma/graphql-config
a
Copy code
ports:
    - "4466:4466"
    environment:
      PRISMA_CONFIG: |
        port: 4466
        # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
        managementApiSecret: my-secret
        databases:
          default:
            connector: mysql
            active: true
            host: db
            port: 3306
            user: root
            password: prisma
they are a couple factor that affeect the url to access the playground
most of them are isolated inside
docker-commpose.yml
first there's de port of docker which just says point my machines port to this docker port
then there's the actual port of prisma which sits inside the environement part
this is an env variable that tells prisma which ports it should send traffic to
by default you can access prisma with localhost:4466 if you didn't make any changes to the config
a
I can, but I cannot access my schema through localhost:4466 I get the spinner of death 😩
Which I think might be related to a previous question. Where I get this error message:
FetchError: request to <http://localhost:4466/> failed, reason: socket hang up
z
adding to above... I'm almost sure only graphcool/prisma's cli commands use .graphqlconfig.yml
that is, you'll have to load them up manually in your server code if you want to use those parameters
understanding that solved a lot of confusion for me!