使用 pgspider griddb fdw 让griddb 支持hasura graphql-engine
原理很简单,就是通过griddb fdw 暴露griddb 的数据操作为正常的pg 操作,后然就可以使用hasura graphql-engine 了
参考环境准备
version: "3"
services:
graphql-engine:
image: hasura/graphql-engine:v1.1.0-beta.3
ports:
- "8080:8080"
depends_on:
- "pgspider-griddb"
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:dalong@pgspider-griddb:5432/postgres
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
pgspider-griddb:
image: dalongrong/pgspider:griddb-4.2
environment:
- "POSTGRES_PASSWORD=dalong"
ports:
- "5432:5432"
griddb-java:
build:
context: ./
dockerfile: ./Dockerfile-java
environment:
- "MEMBER_ADDR=griddb:10001"
griddb:
build: ./
volumes:
- "./log:/var/lib/gridstore/log"
ports:
- "10001:10001"
- "10010:10010"
- "10020:10020"
- "10030:10030"
- "10040:10040"
- "10050:10050"
- "10080:10080"
- "20001:20001"
说明
具体操作可以参考下边的链接,类似可以做好多扩展,比如mysql,sql server,mongodb, sqlite,influxdb。。。。
参考资料
https://github.com/rongfengliang/hasura-graphql-engine-griddb-learning
https://github.com/pgspider/griddb_fdw