Skip to content

Conversation

@webdobe
Copy link

@webdobe webdobe commented Mar 29, 2020

Related to issue #1

@aribouius
Copy link
Owner

@webdobe hey thanks for the PR.

I have no problem merging this as its not breaking and might be useful in some scenarios. I should note however that adding a readOnly to the relationship will prevent you from ever posting the relationship (i.e. what if you need to update it).

The way I handle this currently is just to destructure the payload before sending.

const { author, ...post } = data

mutate('posts', post)

@aribouius aribouius merged commit b318e00 into aribouius:master Mar 30, 2020
@webdobe
Copy link
Author

webdobe commented Apr 1, 2020

Thank you! @aribouius. I think that should be fine. It may be cool at some point to be able to pass in schema alters to the hooks that override anything that is in schema so an individual could get passed that side affect. In my case it is fine but worth thinking about. Also, about how long does it take before npm gets updated?

Thank you!

@aribouius
Copy link
Owner

@webdobe yeah I've definately been thinking about ways to improve how the schema is written and utilized.

Just pushed v0.0.9 to NPM with your updates.

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.

3 participants