Open snewcomer opened 6 years ago
@begedin is this something we can talk about sync some soon? I'd like to actually step through this a little more explicitly to wrap my head around it.
@joshsmith Posted a comment which we could conver into an issue at https://github.com/code-corps/code-corps-api/pull/1349#issuecomment-354760129 but I would agree that this is wort standup time.
@begedin wasn't our conclusion that this is necessary to do, we just need clarity on what the client is going to need so we can design our API more intentionally?
kind of like graphql? I would love that. I worked on a project and eventually there was 5 different views for the same resource, each giving you a different subset of data. It was slightly hard to manage.
In fact, JSON API provides mechanisms to do exactly this: render subsets of data based on what the client requests.
@begedin wasn't our conclusion that this is necessary to do, we just need clarity on what the client is going to need so we can design our API more intentionally?
Including conversation parts in conversation is easier to merge ahead of time, since it doesn't alter much in our architecture, so I would say #1349 is good to go for now, as something we do before adding support for explicit includes.
However, this one is harder to decide on, since it involves adding new subtypes of views, which is an architecture change. It still seems to be an improvement in performance, but I'm not sure what else it entails.
WIP
So this is a first stab at including tasks in the task_list view and would remove the need for this line
taskLists.forEach((taskList) => get(taskList, 'tasks').reload());
in the tasks index route.A couple of notes:
Progress on: #1156