public SecondaryType(TodoListData data) { Name = "SecondaryTodo"; Field(h => h.Id).Description("The id of the Secondary Task."); Field(h => h.Name, nullable: true).Description("The name of the Secondary task."); Field(h => h.Description, nullable: true).Description("The descrition of the Secondary task."); Field <ListGraphType <TodoItemInterface> >( "relatedto", resolve: context => data.GetRelatedTask(context.Source) ); Interface <TodoItemInterface>(); }
public ImportantType(TodoListData data) { Name = "ImportantTodo"; Description = "This is an important task."; Field(h => h.Id).Description("The id of the Important Task."); Field(h => h.Name, nullable: true).Description("The name of the Important task."); Field(h => h.Description, nullable: true).Description("The descrition of the Important task."); Field <ListGraphType <TodoItemInterface> >( "relatedto", resolve: context => data.GetRelatedTask(context.Source) ); Field <PriorityEnum>("priority", "The priority of the tasks"); Interface <TodoItemInterface>(); }