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

Simplify Content Type setup to extend Relationship #1094

Merged
merged 1 commit into from
May 7, 2019

Conversation

jesstelford
Copy link
Contributor

I was struck with inspiration 🛰💥, and realised that the Content type should extend the Relationship type (instead of Text), which means all the tricky stuff I was trying to do with manually triggering nested mutations can be handled by KS5 like normal.

This also greatly simplifies the next bit of work which is querying for the data, plus enables the from back-link Relationship to work out of the box.

@changeset-bot
Copy link

changeset-bot bot commented May 7, 2019

✅ This PR has a changeset ✅
Latest commit: 6a9d4ab

Click here to learn what changesets are.

...RelationshipType,
implementation: class extends RelationshipType.implementation {
async resolveNestedOperations(operations, item, context, ...args) {
const result = await super.resolveNestedOperations(operations, item, context, ...args);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jesstelford jesstelford merged commit 3aeabc5 into master May 7, 2019
@jesstelford jesstelford deleted the refactor-content-type branch May 7, 2019 05:45
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