Graphql-engine: Cannot create migrations / export metadata with dockerized server

Created on 16 Oct 2018  路  2Comments  路  Source: hasura/graphql-engine

I've created a repo to reproduce the bug: https://github.com/maxcan/temp-hasura-console-bug-repro.

Versions:

  • hasura CLI version: v0.4.15
  • GraphQL Engine CLI version: v1.0.0-alpha24
  • GraphQL Engine Server [http://localhost:9080/v1alpha1/graphql] version:

Steps to reproduce:

  1. docker-compose up
  2. log into http://localhost:9080 and create a simple users table
  3. hasura init --endpoint http://localhost:9080/v1alpha1/graphql
  4. dump PG with pg_dump -p 9432 -h localhost -U postgres > public-schema.sql
  5. attempt to export metadata:
% hasura metadata export
Error: cannot create migrate instance: invalid character 'N' looking for beginning of value

Note that hitting http://localhost:9693/apis/migrate/settings causes the same error which blocks using the
console launched by hasura console

Most helpful comment

Hello @maxcan,

Hasura CLI takes the endpoint as the server endpoint, not the v1aplha1/graphql one.

You can edit the config.yaml file and change endpoint to http://localhost:9080

Then metadata export should work.

All 2 comments

Hello @maxcan,

Hasura CLI takes the endpoint as the server endpoint, not the v1aplha1/graphql one.

You can edit the config.yaml file and change endpoint to http://localhost:9080

Then metadata export should work.

@shahidhk worked like a charm, thanks!

Now that I realize that, the docs do show that the endpoint should just be the server so my mistake.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stereobooster picture stereobooster  路  3Comments

tirumaraiselvan picture tirumaraiselvan  路  3Comments

codepunkt picture codepunkt  路  3Comments

lishine picture lishine  路  3Comments

marionschleifer picture marionschleifer  路  3Comments