Could not connect to server at http://prisma:4466 #2332
Answered
by
janpio
marion-ott
asked this question in
Q&A
-
Hi all, I'm running into the following issue : If I use http:localhost:4466 as my endpoint in prisma.yml, when I make a simple query/mutation I get the following error in the playground (even though the prisma playground is running properly on that port) : {
"data": null,
"errors": [
{
"message": "request to http://localhost:4466/ failed, reason: connect ECONNREFUSED 127.0.0.1:4466",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"users"
]
}
]
} After reading that post I tried changing my endpoint to http://prisma:4466 and got this error : Could not connect to server at http://prisma:4466. Please check if your server is running. Here's the server init : import {GraphQLServer} from 'graphql-yoga';
import {prisma} from './generated/prisma-client';
import Query from './resolvers/Query';
import Mutation from './resolvers/Mutation';
const resolvers = {
Query,
Mutation,
};
const server = new GraphQLServer({
typeDefs: 'src/schema.graphql',
resolvers,
context: (req) => ({
...req,
prisma,
}),
});
server.start({port: process.env.PORT || 9000}, () =>
console.log(`Server started ${process.env.PORT}`)
); docker-compose:
docker ps : CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
108ecc85d4ce node:12 "yarn start" 19 minutes ago Up 19 minutes 0.0.0.0:9000->9000/tcp samu-social_server_1
06303e8b2946 mongo:3.6 "docker-entrypoint.s…" 19 minutes ago Up 19 minutes 0.0.0.0:27017->27017/tcp samu-social_mongo_1
278f1c6ebd99 prismagraphql/prisma:1.34 "/bin/sh -c /app/sta…" 19 minutes ago Up 19 minutes 0.0.0.0:4466->4466/tcp samu-social_prisma_1
1b6539c88b04 node:alpine "yarn start" 19 minutes ago Up 19 minutes 0.0.0.0:3000->3000/tcp samu-social_client_1 Thanks for helping out guys! |
Beta Was this translation helpful? Give feedback.
Answered by
janpio
Apr 30, 2020
Replies: 1 comment 1 reply
-
That sounds like a Prisma 1 question which you should post over at https://github.com/prisma/prisma1 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
marion-ott
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That sounds like a Prisma 1 question which you should post over at https://github.com/prisma/prisma1