This container starts Apollo GraphQL server as gateway to other GraphQL endpoints. It also starts Prisma GraphQL playground targeted to this gate.
Env vars:
- ENDPOINTS (string, uri`s split by coma) - to define remote endpoints to services behind gateway
- EXTERNAL_URI (string) - to define service graphql endpoint, default
/
- WS_ENABLE (bool) - enable subscriptions in services, default
false
- PLAYGROUND_ENABLE (bool) - enable GraphQL Playground in gateway, default
false
- QUERY_LOG_ENABLE (bool) - enable query log in service, default
false
- SENTRY_ENABLE (bool) - enable Sentry, default
false
- SENTRY_DSN (string) - Sentry dsn url
- SENTRY_RELEASE (string) - Sentry release version, default
0.5
- SENTRY_ENV (string) - Sentry environment, default
debug
- SCOPE_HEADER (string) - Request scope header, default
Operation-Scope
- GELF_ENABLE (bool) - enable GELF logger, default
false
- GELF_HOST (string) - GELF host, required if GELF enabled
- GELF_PORT (int) - GELF port, default
12201
- GELF_PROTOCOL (string) - GELF protocol, possible values: [
udp
,tcp
,tcp-tls
], defaultudp
- DEPLOY_TYPE (string) - Deploy type (only shown in Graylog), default
dev
- SERVICE_NAME (string) - Service name (only shown in Graylog), default
prisma
- LOG_LEVEL (string) - Service log level. Possible values: TRACE, DEBUG, INFO, WARN, ERROR. Default
INFO
- WORKERS (int) - Number of cluster workers. Default: by number of CPU`s
Sample docker-compose.yml
can look like this:
version: '2'
services:
prisma:
image: prisma-graphql-gateway
ports:
- 4000:4000
environment:
- ENDPOINTS=http://sampleservice1/graphql,http://sampleservice2/graphql
- Filter origin headers
- Cluster mode.
- Fix: Subscription WS connection to server have not been closed after client disconnect
- Add remote schema error handler
- Fix websocket GraphQL Subscriptions
- Fix auth header remove when is not empty
- Fix Sentry version recognition
- Fix auth header remove when is empty
- Temporary remove Gelf logging. Issue for problem: Sebbia#20
- Check authorization header length
- Fix authorization headers by default
- Add query response logging
- Fix types
- Fix run scripts
- Fix saving settings in playground
- Fix scope type definition
- Complete rewrite to Typescript
- Add
PLAYGROUND_ENABLE
env variable for purpose to turn off GraphQL Playground
- Send all request headers to backends
- Fix resolve origin ip from websocket
- Add quick test script
- Send extra data to GELF in json string instead object
- Add service name and deploy type to gelf logger
- Replace a forgotten console.log to own logger
- Add Gelf logger
- Add scope to every request to endpoints
- Add query logging
- From now, SENTRY_RELEASE by default is service version
Add X-Forwarded-For
header to request