postgraphile-plugin-batch-create-update-delete
postgraphile-plugin-batch-create-update-delete copied to clipboard
When generating batch mn* mutations does not properly handle type in separate schema from table
Example:
- Table is named:
testing
, and is in schemaone
(one.testing
) - Column is on this same table named:
status
(one.testing.status
) and has a type ofstatus_type
, in schematwo
(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.
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).