tjmoses / postgraphile-plugin-batch-create-update-delete

A postgraphile plugin that allows for batch create, update, & delete mutations in a single transaction.
https://www.npmjs.com/package/postgraphile-plugin-many-create-update-delete
MIT License
37 stars 9 forks source link

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

Open jmartin127 opened 8 months ago

jmartin127 commented 8 months ago

Example:

{
  "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.

tjmoses commented 8 months ago

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).