Hacker News new | ask | show | jobs
by bottlepalm 1181 days ago
It's good, but verbose, you can't select nested objects by just doing lesson.mapped.sections.course .. etc.. you have have to do something like

    lesson: {
        select: {
            id: true,
            slug: true,
            title: true,
            mapped_sections: {
                select: {
                    id: true,
                    slug: true,
                    section: {
                        select: {
                            id: true,
                            title: true,
                            course: {
                                select: {
                                    id: true,
                                    slug: true,
                                    title: true