File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,9 @@ public class CharacterInterface : InterfaceGraphType
43
43
public CharacterInterface ()
44
44
{
45
45
Name = " Character" ;
46
- Field (" id" , " The id of the character." , NonNullGraphType . String );
47
- Field (" name" , " The name of the character." , NonNullGraphType . String );
48
- Field ( " friends " , new ListGraphType <CharacterInterface >() );
46
+ Field < NonNullGraphType < StringGraphType >> (" id" , " The id of the character." );
47
+ Field < NonNullGraphType < StringGraphType >> (" name" , " The name of the character." );
48
+ Field < ListGraphType <CharacterInterface >>( " friends " );
49
49
ResolveType = (obj ) =>
50
50
{
51
51
if (obj is Human )
@@ -63,8 +63,8 @@ public class DroidType : ObjectGraphType
63
63
{
64
64
var data = new StarWarsData ();
65
65
Name = " Droid" ;
66
- Field (" id" , " The id of the droid." , NonNullGraphType . String );
67
- Field (" name" , " The name of the droid." , NonNullGraphType . String );
66
+ Field < NonNullGraphType < StringGraphType >> (" id" , " The id of the droid." );
67
+ Field < NonNullGraphType < StringGraphType >> (" name" , " The name of the droid." );
68
68
Field <ListGraphType <CharacterInterface >>(
69
69
" friends" ,
70
70
resolve : context => data .GetFriends (context .Source as StarWarsCharacter )
You can’t perform that action at this time.
0 commit comments