# qenerate: plugin=pydantic_v2

query AssignmentIndex($group_id: ID!) {
    node(id: $group_id) {
        ... on AssignmentGroup {
            assignmentsConnection {
                nodes {
                    id
                    name
                    description
                    dueAt
                    position
                    pointsPossible
                    courseId
                    assignmentGroupId
                    createdAt
                    updatedAt

                    lockInfo {
                        unlockAt
                        lockAt
                        canView
                        isLocked
                    }

                    submissionsConnection {
                        nodes {
                            id
                            score
                            attempt
                            body
                            createdAt
                            updatedAt
                            groupId

                            attachments {
                                ...Attachment
                            }

                            commentsConnection {
                                nodes {
                                    id
                                    htmlComment
                                    attachments {
                                        ...Attachment
                                    }
                                    createdAt
                                    updatedAt

                                    author {
                                        name
                                    }
                                }
                            }
                        }
                    }
                }

            }
        }
    }
}