Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

add type field automatically to all objects when creating #184

Open
alastair opened this issue Apr 13, 2021 · 0 comments
Open

add type field automatically to all objects when creating #184

alastair opened this issue Apr 13, 2021 · 0 comments

Comments

@alastair
Copy link
Member

Sometimes we have lists of objects that are of varying types. For example, an ItemList could contain a DefinedTermSet, an Annotation, and an AudioObject.
At the moment I'm distinguishing these items by adding __typename to the output. However, all objects have a type field which is supposed to be the semantic web type (the same type that we serialise to @type in the json-ld serialiser).
If we automatically filled in this type (+additionalType if the object has more than 1 type) then we could use it for filtering or processing data, but I'm not sure if it makes sense to do it. __typename is pretty stable for this case anyway.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant