from graphene import relay
from graphene_django.filter import DjangoFilterConnectionField

from assignments.models import StudentSubmission
from assignments.schema.types import AssignmentNode, StudentSubmissionNode


class AssignmentsQuery(object):
    assignment = relay.Node.Field(AssignmentNode)
    assignments = DjangoFilterConnectionField(AssignmentNode)


class StudentSubmissionQuery(object):
    student_submission = relay.Node.Field(StudentSubmissionNode)
