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

Hasura Actions: non-nullable fields can return null #3977

@tomasherout

Description

@tomasherout

Hasura is not checking response from action handler. Field in schema marked as non nullable, e.g.:

type SampleOutput {
  accessToken : String!
  userId : Int!
}

and badly implemented handler which doesn't return mandatory fields cause response:

{
  "data": {
    "actionName": {
      "accessToken": null,
      "userId": null
    }
  }
}

Schema should be accepted and thus bad answer from resolver can be ignored. In this way works other GraphQL servers like Apollo or GraphQL JS.

Metadata

Metadata

Assignees

Labels

c/actionsRelated to actionsc/serverRelated to servere/easycan be wrapped up in a couple of days

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions