# qenerate: plugin=pydantic_v1

query CourseMail($user_id: ID!) {
    legacyNode(_id: $user_id, type: User) {
        ... on User {
            conversationsConnection(scope: "inbox") {
                nodes {
                    conversation {
                        conversationMessagesConnection(first: 1) {
                            nodes {
                                id
                                body
                                createdAt
                                author {
                                    name
                                }
                            }
                        }
                        contextId
                        contextName
                        contextType
                        subject
                    }
                }
            }
        }
    }
}
