mirror of
https://github.com/strapi/strapi.git
synced 2025-08-08 00:37:38 +00:00
- fix in graphql type builder (#6075)
a required attribute that has a default value it's now not required in the input schema used for entities creation Signed-off-by: Gadi Piperno Corcos <gadi@skyriseltd.com> Co-authored-by: Gadi Piperno Corcos <gadi@skyriseltd.com>
This commit is contained in:
parent
c587bda522
commit
eb272e996c
@ -71,8 +71,10 @@ module.exports = {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attribute.required && action !== 'update') {
|
if (attribute.required) {
|
||||||
type += '!';
|
if (rootType !== 'mutation' || (action !== 'update' && attribute.default === undefined)) {
|
||||||
|
type += '!';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return type;
|
return type;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user