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

feat: custom relationship types #20

Merged
merged 1 commit into from
Jan 14, 2023

Conversation

Delerme
Copy link
Contributor

@Delerme Delerme commented Jan 13, 2023

When serializing data with relationships, the relationship type is currently set to whatever the key on the data object is. This isn't always desired. We could have two relationship properties that are of the same type, but they cannot share a key in typescript.

Change the serialize relationships property to accept a string array of property names or a mapping from property name to the related resource's type.

When serializing data with relationships, the relationship type
is currently set to whatever the key on the data object is. This
isn't always desired. We could have two relationship properties that
are of the same type, but they cannot share a key in typescript.

Change the serialize relationships property to accept a string array
of property names _or_ a mapping from property name to the related
resource's type.
Copy link
Owner

@andersondanilo andersondanilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for your contribution

@andersondanilo andersondanilo merged commit 70653e7 into andersondanilo:master Jan 14, 2023
github-actions bot pushed a commit that referenced this pull request Jan 14, 2023
## [2.3.0](v2.2.0...v2.3.0) (2023-01-14)

### Features

* custom relationship types ([#20](#20)) ([70653e7](70653e7))

### Bug Fixes

* changeCase for relation names ([#21](#21)) ([d8ca17f](d8ca17f))
@github-actions
Copy link

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants