hasura-v2.xx gives graphql-engine-1 exited with code 1 on `hasura metadata track …`

hasura-v2.xx gives graphql-engine-1 exited with code 1 on `hasura metadata track …`


0

I’m trying to get started with Hasura. So here is my docker-compose.yml file:

version: "3.6"
services:
  postgres:
    image: postgres:15
    restart: always
    volumes:
      - db_data:/var/lib/postgresql/data
    environment:
      POSTGRES_PASSWORD: postgrespassword
  graphql-engine:
    build:
      context: .
      dockerfile: DockerfileHasura
    # command: /bin/sh -c 'hasura metadata track --all-tables --all-relationships --schema public --endpoint https://graphql-engine:8080 && exec graphql-engine serve'
    command: /bin/sh -c 'exec graphql-engine serve'
    ports:
    - "8080:8080"
    restart: always
    volumes:
    - ./migrations:/hasura-migrations
    - ./metadata:/hasura-metadata
    - ./track_tables.sh:/track_tables.sh
    environment:
      HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
      PG_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
      HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
      HASURA_GRAPHQL_DEV_MODE: "true"
      HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
      HASURA_GRAPHQL_CORS_DOMAIN: "*"
volumes:
  db_data:

And inside DockerfileHasura, I’m just installing the CLI of Hasura so that I can keep track of all the tables / view:

FROM hasura/graphql-engine:v2.33.0

RUN curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash

I can’t even run the system with command: /bin/sh -c 'hasura metadata track --all-tables --all-relationships --schema public --endpoint https://graphql-engine:8080 && exec graphql-engine serve', it gives me: graphql-engine-1 exited with code 1

Then I came to know that, there in v2.xx they no longer support it. But I want to make this reflection hard-coded. So that I dont’ have to open up the web console, and edit stuff. Ref: https://github.com/hasura/graphql-engine/issues/1418#issuecomment-894306630

Now I’m getting "field 'product' not found in type: 'query_root'",. Althouh they have been created.

It’s not showing any view / table in the data section:

hasura-v2.xx gives graphql-engine-1 exited with code 1 on `hasura metadata track ...`

So any suggestion or workaround for me? I want to track every table created in my hasura system by default


Load 3 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *