Skip to content

Commit 0250259

Browse files
committed
Update field syntax.
1 parent 3dcf557 commit 0250259

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ public class CharacterInterface : InterfaceGraphType
4343
public CharacterInterface()
4444
{
4545
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");
4949
ResolveType = (obj) =>
5050
{
5151
if (obj is Human)
@@ -63,8 +63,8 @@ public class DroidType : ObjectGraphType
6363
{
6464
var data = new StarWarsData();
6565
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.");
6868
Field<ListGraphType<CharacterInterface>>(
6969
"friends",
7070
resolve: context => data.GetFriends(context.Source as StarWarsCharacter)

0 commit comments

Comments
 (0)