skillbox/server/objectives/inputs.py

23 lines
615 B
Python

import graphene
from graphene import InputObjectType
class ObjectiveInput(InputObjectType):
text = graphene.String(required=True)
id = graphene.ID()
class AddObjectiveArgument(InputObjectType):
text = graphene.String(required=True)
objective_group = graphene.ID(reuired=True)
class AddObjectiveGroupArgument(InputObjectType):
title = graphene.String(required=True)
module = graphene.ID(required=True)
objectives = graphene.List(ObjectiveInput)
class UpdateObjectiveGroupArgument(InputObjectType):
id = graphene.ID(required=True)
objectives = graphene.List(ObjectiveInput)