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
typeGroup {
""" An auto-generated string that identifies this root entity uniquely among others of the same type """id: ID!"""The instant this object has been created"""createdAt: DateTime!""" The instant this object has been updated the last time (not including relation updates) """updatedAt: DateTime!name: Stringtype: String""" Provides a value that can be supplied to the `after` argument for pagination. Depends on the value of the `orderBy` argument. """_cursor: String""" An identifier that is updated automatically on each update of this root entity (but not on relation changes) """_revision: ID!
}
The same issue applies to the mutation input types, e.g. CreateGroupInput as well.
The text was updated successfully, but these errors were encountered:
Yes, cruddl currently does not support non-null types. The fact that it does not warn about using them in the input schema files is a bug currently.
About non-null types we have been tracking this missing feature for a few years. Just passing through ! could work, but it feels like this would not address the issue fully.
There are no checks that the existing data conforms to this non-null type, or that data stays conforming when edited outside of cruddl (yes, that's already the case for regular types)
GraphQL errors on fields bubble up to the first field that is nullable. In the case of cruddl, these errors are type mismatch errors and permission errors. Marking output types as non-nullable would result in errors bubbling up all the way to the top, so you could no longer receive partial data.
In input types, fields can be either omitted or specified to null, which leads to different behavior in cruddl's update mutations (omitting a field leaves it alone, specifying null sets the field to null). Non-null input fields affect both cases - you can't mark a field as optional, but non-nullable. So for update input types, we would need to allow null even on non-nullable fields, and we would either need to throw a custom error if null is specified or treat null like non-specified in this case. Both behaviors can be confusing.
These issues, combined with limited resources, sadly result in cruddl not having required fields currently. In case you have ideas or opinion about these issues, feel free to share them.
We've noticed that the final GQL schema generated by Cruddl seems to be lacking non-null (
!
) rules that are present in the original model.For example:
generates:
The same issue applies to the mutation input types, e.g.
CreateGroupInput
as well.The text was updated successfully, but these errors were encountered: