import { graphql } from "@/gql";

export const ASSIGNMENT_COMPLETION_QUERY = graphql(`
  query assignmentCompletionQuery(
    $assignmentId: ID!
    $courseSessionId: ID!
    $assignmentUserId: ID
  ) {
    assignment(id: $assignmentId) {
      assignment_type
      content_type
      effort_required
      evaluation_description
      evaluation_document_url
      evaluation_tasks
      id
      intro_text
      performance_objectives
      slug
      tasks
      title
      translation_key
    }
    assignment_completion(
      assignment_id: $assignmentId
      course_session_id: $courseSessionId
      assignment_user_id: $assignmentUserId
    ) {
      id
      completion_status
      submitted_at
      evaluation_submitted_at
      evaluation_user {
        id
      }
      assignment_user {
        id
      }
      evaluation_grade
      evaluation_points
      completion_data
    }
  }
`);

export const COURSE_QUERY = graphql(`
  query courseQuery($courseId: Int!) {
    course(id: $courseId) {
      id
      slug
      title
      category_name
      learning_path {
        id
      }
    }
  }
`);
