Nickforall / Freight

🚚💨 Dynamically create Absinthe GraphQL payload objects for mutations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The ecto changeset helper doesn't take aliasses into account

Nickforall opened this issue · comments

userUpdate(id: "043743d5-7b9e-4415-bf11-7ec2643ddb92", user: {
    isAdmin: null
  }) {
    successful
    user {
      isAdmin
    }
    errors {
      message
    }
  }

for example, throws the following error:

{
    "errors": [
        {
          "message": "is_admin cannot be explicitely set to null"
        }
    ]
}

Because the field is defined as is_admin in the database