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

Improving relation transformers #36

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Improving relation transformers #36

wants to merge 11 commits into from

Conversation

lorado
Copy link
Contributor

@lorado lorado commented Jan 14, 2019

For my project I use morphManyToMany a lot. Unfortunately there was not implementation in StoreTransformer to handle such relations. So I decided to implement it.

Currently I handled just the case of morphManyToMany relation. I also created 3 tests to create, update, clear this type of relation.

I also seen some improvements potential in other relation transformers. I will probably also refactor them, when I have time. E.g. there is a way to handle morph relations without passing morhType explicitly (currently there is __typename argument for it).

BTW: It would be nice, when we add some documentation with examples for modifying such relations with store mutation... I should look into test cases, to find HOW graphql should be defined... May be I will do it next week.

What do you think?

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

1 participant