Skip to content

Commit f592c70

Browse files
authored
Update cli-plugin.md
The id should be of the ID type to make sure clients will have a key to trust to uniqueness.
1 parent 566fd5b commit f592c70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/graphql/cli-plugin.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ With what we've learned so far, you have to duplicate a lot of code to let the p
2222
@@filename(authors/models/author.model)
2323
@ObjectType()
2424
export class Author {
25-
@Field(type => Int)
25+
@Field(type => ID)
2626
id: number;
2727

2828
@Field({ nullable: true })
@@ -44,7 +44,7 @@ By enabling the GraphQL plugin, the above class definition can be declared simpl
4444
@@filename(authors/models/author.model)
4545
@ObjectType()
4646
export class Author {
47-
@Field(type => Int)
47+
@Field(type => ID)
4848
id: number;
4949
firstName?: string;
5050
lastName?: string;

0 commit comments

Comments
 (0)