Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "type" property for each item in the normalized data #10

Closed
wants to merge 1 commit into from

Conversation

paul-querol
Copy link
Contributor

In cases where multiple document types can be returned and included for one relationship, it's currently difficult to see what data type a document has if it can be one of many without checking for the presence or absence of specific fields which would be brittle.

@aribouius
Copy link
Owner

Closing in favor of #11

@aribouius aribouius closed this Jun 15, 2020
@paul-querol
Copy link
Contributor Author

Hi @aribouius,

I know this was closed in favour of #11 but would you reconsider including it as well. The other commit ultimately should achieve the same goal but the implementor has a lot more working out to do to get there.

In cases where a developer needs to process a number of different item types on a single relationship which is a common requirement if people are building a page where a number of arbitrary section types that are compiled as a list, the raw data makes it easy to see what each section is and select the appropriate component to render it but that type information is effectively stripped from the normalised data.

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

Successfully merging this pull request may close these issues.

None yet

2 participants