You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue appeared with the new schema definition introduced with #5392.
Patching attributes with editField was previously validated with json schema, which has been removed.
This is not an issue 99% of the time... but we introduced a new use case in #4304 : a non-multiple object attribute.
This kind of object can be updated with either a complete payload, such as
This would still be valid for elastic, and there is no way of preventing this on elastic side (no concept of mandatory field).
The consequences are bad: the object is now partial in DB, but shall be complete for GQL (in my example, overrides cannot be null)
Solution
Enforce a validation against the schema when editing an object field.
This can be done at the earliest time (resolver) or at the bottom of the chain (just before elastic query). TBD.
-> done just before indexing, when the payload is ready.
The text was updated successfully, but these errors were encountered:
Problem
This issue appeared with the new schema definition introduced with #5392.
Patching attributes with
editField
was previously validated with json schema, which has been removed.This is not an issue 99% of the time... but we introduced a new use case in #4304 : a non-multiple object attribute.
This kind of object can be updated with either a complete payload, such as
... or a partial "patch" update like
However, nothing prevents the user from sending a complete update with a partial object, such as:
This would still be valid for elastic, and there is no way of preventing this on elastic side (no concept of mandatory field).
The consequences are bad: the object is now partial in DB, but shall be complete for GQL (in my example,
overrides
cannot benull
)Solution
Enforce a validation against the schema when editing an object field.
This can be done at the earliest time (resolver) or at the bottom of the chain (just before elastic query). TBD.-> done just before indexing, when the payload is ready.
The text was updated successfully, but these errors were encountered: