-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Spike] How to do relation traversal #1952
Comments
I have posted a comment in the other issue with a proposal how to implement inclusion of related models at Repository level, see #1352 (comment) |
Thanks for all the feedback! I understand that the best outcome of a spike is a concrete solution, but I am afraid the inclusion story is more complicated than we expect, and it would be better to create separate stories to explorer different potential approaches. Like what @raymondfeng points out, GraphQL's query system has two features we could borrow:
And a overall design question to consider (from @bajtos ) : How are we going to generate JSON Schema and OpenAPI schema for payloads containing both model properties (Customer's id, name, email) and data of related model (Customer's orders, addresses, etc.). At the moment, we are leveraging @Property metadata. If we choose a different approach for describing model+relations in TypeScript, then we also need a new way how to obtain JSON Schema for such new types. Here is a proposal of the next steps:
|
closing this story and let's explorer different approaches in the follow-up story: |
Timebox to 5 days.
Description / Steps to reproduce / Feature proposal
Originated from #1352
Cross posting the description from @bajtos (#1352 (comment)):
Acceptance Criteria
Investigate how to implement relation traversal. Implementation of the following DefaultCrudRepository methods to correctly support inclusion of related models as configured via
filter.include
property.The text was updated successfully, but these errors were encountered: