public CharacterType(GoTData data) { Name = "Character"; Field(h => h.Id); Field(h => h.Name, nullable: true); Field(h => h.Image, nullable: true); Field(h => h.IsHealthy, nullable: true); Field <HouseType>( "house", resolve: context => data.GetHouseById(context.Source.HouseId) ); Field <ListGraphType <CharacterType> >( "siblings", resolve: context => data.GetSiblings(context.Source) ); Field <ListGraphType <CharacterType> >( "spouses", resolve: context => data.GetSpouses(context.Source) ); Field <ListGraphType <CharacterType> >( "lovers", resolve: context => data.GetLovers(context.Source) ); Field <ListGraphType <HouseType> >( "allegiences", resolve: context => data.GetAllegiances(context.Source) ); }
public CharacterType(GoTData data) { Name = "Character"; Field(h => h.Id); Field(h => h.Name, nullable: true); Field(h => h.Image, nullable: true); Field <ListGraphType <CharacterType> >( "siblings", resolve: context => data.GetSiblings(context.Source) ); }
public CastleType(GoTData data) { Name = "Castle"; Field(h => h.Id); Field(h => h.Name, nullable: true); Field(h => h.Location, nullable: true); Field(h => h.Religion, nullable: true); /* Field<ListGraphType<string>>( * "religion", * resolve: context => data.GetReligions(context.Source) * ); */ }
public HouseType(GoTData data) { Name = "House"; Field(h => h.Id); Field(h => h.Name, nullable: true); Field(h => h.Words, nullable: true); Field(h => h.Region, nullable: true); Field(h => h.Image, nullable: true); Field <ListGraphType <HouseType> >( "allegionhouse", resolve: context => data.GetAllegion(context.Source) ); Field <ListGraphType <CharacterType> >( "members", resolve: context => data.GetHouseMembers(context.Source) ); /* Field<ListGraphType<string>>( * "religion", * resolve: context => data.GetReligions(context.Source) * ); */ }