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
it is recommended that every uniquely identifyable concept in your application, does have an id field of the graphQL ID type. By default, any object types for which this is true, is considered to be a "root type"
For specific business purposes we can't use an id field as an identifier. In our case, we have a filed called key which is an identifier, but the object is not considered as a root type. Is there any way to specify that identifier field should not only to be an id for detecting root types?
The text was updated successfully, but these errors were encountered:
One thing that also worth considering is not to stick to requiring the id field to be of type ID. In case of Hasura the id fields will be a scalar type named after the postgres type of the id field, eg. bigint or uuid. --fieldOverrides seems to provides a solution for this, but it is a generic and not related to id-, which need specific attention as the automatic root type detection algorithm looks for specifically the field id and ID! type. So --fieldOverrides only works together with --roots in case of id field overrides.
Moreover it maybe useful to allow specifying id field name per root entity as different entities may have different id fields, eg. some called id others called key, etc.
As mentioned in documentation,
Our schema:
Is generated model.base:
For specific business purposes we can't use an
id
field as an identifier. In our case, we have a filed calledkey
which is an identifier, but the object is not considered as aroot type
. Is there any way to specify that identifier field should not only to be anid
for detecting root types?The text was updated successfully, but these errors were encountered: