Skip to content

Instantly share code, notes, and snippets.

@MBehtemam
Created December 1, 2018 07:00
Show Gist options
  • Save MBehtemam/8946932c4ddf8512f1cfbe81f52a35fc to your computer and use it in GitHub Desktop.
Save MBehtemam/8946932c4ddf8512f1cfbe81f52a35fc to your computer and use it in GitHub Desktop.
Todo Type
using System;
using GraphQL.Types;
using TodoAPI.Data;
namespace TodoAPI.Models
{
class TodoType : ObjectGraphType<Todo>
{
public TodoType(ITodoRepository todoRepository)
{
Field(x => x.Id).Description("Id of Todo");
Field(x => x.Title).Description("Title of todo");
Field(x => x.Completed).Description("Is Todo Completed");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment