This Docker image runs a live GraphQL editor (Apollo Server + GraphiQL UI) that automatically reloads whenever the GraphQL schema file updates โ that supports schemas generated from gqlbridge (Flask-based backend).
A Python script (generate_schema.py) runs during container startup to generate the initial schema, and the Node.js server continuously watches for schema changes.
It can also proxy requests to a remote GraphQL endpoint (e.g., a Flask backend).
graphql-dynamic-editor/ โ โโโ Dockerfile โโโ package.json โโโ server.js # Apollo + GraphiQL server with live reload & remote proxy support โโโ generate_schema.py # Python script to generate /app/schema.graphql โโโ schema.graphql # GraphQL schema (auto-updated) โโโ .env # Environment variables for DB & endpoint config โโโ alias.yml # Defines aliases for columns, tables, and schemas
.env FilePOSTGRES_USER=admin
POSTGRES_PASSWORD=secret
POSTGRES_DB=mydb
POSTGRES_HOST=my-postgres
POSTGRES_PORT=5432
# Remote GraphQL endpoint (Flask backend)
GRAPHQL_ENDPOINT=http://host.docker.internal:5000/graphql-query
# Optional authentication token (if required)
GRAPHQL_TOKEN=<Token>
tables:
public: # Schema name
epics: # Table name under the above schema
table_name: epic # Rename the table (optional)
schema_name: test # Rename the schema of above mentioned table (optional)
old_col: yaml # Rename a column: old_column_name: new_column_name
sudo docker run -d \
--name graphql-editor \
--env-file .env \
-v alias.yml:/app/alias.yml \
-p 4000:4000 \
graphql-dynamic-editor
| ๐งฉ The --env-file .env flag passes environment variables into the container.
| Component | Role |
|---|---|
Python (generate_schema.py) | Runs on startup โ connects to DB โ generates /app/schema.graphql |
/app/schema.graphql | The live schema used by Apollo Server |
| Apollo Server (Node.js) | Hosts GraphQL endpoint + GraphiQL UI |
chokidar in server.js | Watches the schema file โ logs when schema updates (manual restart needed) |
| .env file | Provides DB credentials and configuration |
| alias.yml | Defines aliases for tables, schemas, and columns to resolve GraphQL naming conflicts |
| GRAPHQL_ENDPOINT | Optional remote GraphQL backend URL for proxying queries |
| GRAPHQL_TOKEN | Optional authentication token for secure remote requests |
Content type
Image
Digest
sha256:a378ed357โฆ
Size
464.1 MB
Last updated
11 months ago
docker pull omegabridge/gqlbridge-editor:v1.0.2