I am trying to connect via this documentation of GraphQL Mesh the ParseServer which is a docker container to Mesh via the .meshrc.yaml
file. But I am not sure how to send the MASTER Key
and Application ID
in order to do the proper connection.
What I've tried already is:
- schemaHeaders
- operationHeaders
Neither of them worked. When I am running the graphql_mesh from my docker-compose I am getting the fallowing error:
Failed to generate the schema Error: Failed to fetch introspection from http://localhost:1337/graphql: Error: connect ECONNREFUSED 127.0.0.1:1337 2023-02-10T13:38:52.347296144Z at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)
Below I my docker files and my .meshrc.yaml.
docker-compose.yml
file:
version: '3.9'
services:
database:
image: mongo:6.0.4
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
volumes:
- ${HOME}/_DOCKER_DATA_/database:/data/db
networks:
- my_network
server:
restart: always
image: parseplatform/parse-server:5.4.1
ports:
- 1337:1337
environment:
- PARSE_SERVER_APPLICATION_ID=COOK_APP
- PARSE_SERVER_APPLICATION_NAME=COOK_NAME
- PARSE_SERVER_MASTER_KEY=MASTER_KEY_1
- PARSE_SERVER_DATABASE_URI=mongodb://admin:admin@mongo/parse_server?authSource=admin
- PARSE_SERVER_URL=http://10.0.2.2:1337/parse
- PARSE_SERVER_MOUNT_GRAPHQL=true
links:
- database:mongo
volumes:
- ${HOME}/_DOCKER_DATA_/server:/data/server
networks:
- my_network
dashboard:
image: parseplatform/parse-dashboard:5.0.0
ports:
- "4040:4040"
depends_on:
- server
environment:
- PARSE_DASHBOARD_APP_ID=COOK_APP
- PARSE_DASHBOARD_MASTER_KEY=MASTER_KEY_1
- PARSE_DASHBOARD_USER_ID=admin
- PARSE_DASHBOARD_USER_PASSWORD=admin
- PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=true
- PARSE_DASHBOARD_SERVER_URL=http://localhost:1337/parse
- PARSE_DASHBOARD_GRAPHQL_SERVER_URL=http://localhost:1337/graphql
volumes:
- ${HOME}/_DOCKER_DATA_/dashboard:/data/dashboard
networks:
- my_network
graphql_mesh:
build:
context: .
dockerfile: Dockerfile_graphql_mesh
volumes:
- ./work/.meshrc.yaml:/work/.meshrc.yaml
ports:
- "4000:4000"
stdin_open: true
tty: true
networks:
- my_network
networks:
my_network:
driver: bridge
The Dockerfile_graphql_mesh
:
FROM node:19.6.0-alpine3.17
COPY work /work
WORKDIR /work
RUN yarn add @graphql-mesh/cli
RUN yarn add graphql
RUN yarn add @graphql-mesh/graphql
RUN yarn add @graphql-mesh/runtime
RUN yarn add @envelop/auth0
CMD yarn run mesh dev
.meshrc.yaml
:
sources:
- name: ParseServer_3
handler:
graphql:
endpoint: http://localhost:1337/graphql
schemaHeaders:
X-Parse-Application-Id: 'COOK_APP'
X-Parse-Master-Key: 'MASTER_KEY_1'
serve:
playground: true
I am trying to get the propper conection and generation of schema.grapql via the GraphQL Mesh.