这是indexloc提供的服务,不要输入任何密码
Skip to content

Append Mutation Returning JSONB as String #3365

@jcmoore0

Description

@jcmoore0

I am finding an issue in v1.0.0-beta.10
Problem: Update mutation returns a jsonb field as string type.
The Json data is inserted into the database successfully.
Other (non json) fields in the reponse are ok.
The json field in the reponse is a proper string representation of the json and can be successfully parsed into an object with JSON.parse()

mutation update_something($id: Int!, $value: jsonb!) {
  update_something(where: { id: { _eq: $id } }, _append: { something_jsonb: $value }) {
    affected_rows
    returning {
      ...fields
    }
  }
}

response:
{"data":{"update_something":{"affected_rows" : 1, "returning" : [{"id":2,"something_jsonb":"{\"key1\": [{\"type\": \"id\", \"field\": \"id\", \"headerName\": \"ID\",   ...

Metadata

Metadata

Assignees

Labels

c/serverRelated to serverk/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions