graphql-mesh
graphql-mesh copied to clipboard
Mysql Input handler -> No mark columns auto_increment, nullable and with default values as mandatory on generated input schema
Is your feature request related to a problem? Please describe.
When you use mysql-input handler and some tables have "default" values, It would be desirable for those columns not to be required on input over mutation table
if you declare a table like:
create table mytable ( id int auto_increment not null primary key , name varchar(50) not null,age datetime NOT NULL DEFAULT '0000-00-00 00:00:00', created date );
you expect when you mutation over that table for columns: id, created and even "age" not to be "required"
Describe the solution you'd like
any column mark as "nullable", "with default value" or auto_increment type not need too be marked as required on mutation for that table.
Additional context
mutation {
insertMytable(mytable: {
name: "optimus",
created: "2021-01-01"
}) {
id,
age,
created
}
}
error:
"message": "Field \"MytableInsertInput.id\" of required type \"Int!\" was not
@jarpz Did you find any workaround for this issue?