postgraphile-plugin-batch-create-update-delete icon indicating copy to clipboard operation
postgraphile-plugin-batch-create-update-delete copied to clipboard

When generating batch mn* mutations does not properly handle type in separate schema from table

Open jmartin127 opened this issue 10 months ago • 1 comments

Example:

  • Table is named: testing, and is in schema one (one.testing)
  • Column is on this same table named: status (one.testing.status) and has a type of status_type, in schema two (two.status_type)
{
  "errors": [
    {
      "message": "type \"one.status_type\" does not exist",
      "path": [
        "mnUpdateTestingById"
      ]
    }
  ],
  "data": {
    "mnUpdateTestingById": null
  }
}

The issue seems to be that it is looking for the type (two.status_type) in the same schema as the table, which isn't always the case.

jmartin127 avatar Mar 26 '24 22:03 jmartin127

Yep, you've hit a known bug. I suppose I would need to first search the same schema then if the type isn't found start searching any others available. That or I could add an option and allow the user to put their own schema for type searches (probably best).

tjmoses avatar Mar 27 '24 16:03 tjmoses