Graphql-engine: v1.2.0-beta.4 parse json path error: Failed reading: invalid key element

Created on 19 Apr 2020  路  2Comments  路  Source: hasura/graphql-engine

Query in v1.2.0-beta.3 (and earlier):

query myAllowedConfig {
  config_by_pk(key: "sync-from-telesales") {
    value(path: "SCBD")
  }
}

Result in v1.2.0-beta.3:

{
  "data": {
    "config_by_pk": {
      "value": "2020-04-19T10:33:20.457Z"
    }
  }
}

Result same query in v1.2.0-beta.4:

{
  "errors": [
    {
      "extensions": {
        "path": "$.selectionSet.config_by_pk",
        "code": "parse-failed"
      },
      "message": "parse json path error: Failed reading: invalid key element"
    }
  ]
}

json data in value filed:

{"SCBD":"2020-04-19T10:18:20.577Z"}
server bug

All 2 comments

@vitaliytv It will be fixed in PR #3892 There is some change on new json path parser. Can you temporarily fix by adding dot before property name, e.g .SCBD

Fixed in https://github.com/hasura/graphql-engine/pull/3892. Will be out in v1.2.0-beta.5

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bogdansoare picture bogdansoare  路  3Comments

EmrysMyrddin picture EmrysMyrddin  路  3Comments

hooopo picture hooopo  路  3Comments

coco98 picture coco98  路  3Comments

sachaarbonel picture sachaarbonel  路  3Comments