Skip to content

Enrollment Interest API

tigermli edited this page Dec 1, 2020 · 3 revisions

How to create an interest?

mutation {
    createInterest(parent: 2, course: 17) {
        interest {
            id
            parent {
                user {
                    id
                    firstName
                    lastName
                }
            }
            course {
                id
                title
            }
        }
    }
}

How to get courses a parent is interested in?

query {
    interests(parentId: 2) {
        id
        parent {
            user {
                id
                firstName
                lastName
            }
        }
        course {
            id
            title
        }
    }
}

How to get all parents interested in a course?

query {
    interests(courseId: 2) {
        id
        parent {
            user {
                id
                firstName
                lastName
            }
        }
        course {
            id
            title
        }
    }
}