The id
field is more a common convention than a necessity. I don’t know if you have a common field that you can use as a keyField for those records, but you might also take a look at the “Customizing cache IDs” section of our docs (specifically the dataIdFromObject
) where this would allow you to define a global default.
Keep in mind that you don’t have to define a merge
function for every non-normalized type. This is only necessary if you have different queries with overlapping data and you want to make sure the fields are merged correctly.
If you have an idea on how to improve this feature, you might consider filing a feature request so we can determine if we can find ways to make this easier.