Skip to content

Commit 89047e2

Browse files
committed
Prefer static method for welcome example
1 parent 6e573b3 commit 89047e2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

website/docs/01-getting-started/index.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ Grats is flexible enough to work with both class-based and functional approaches
1717
<TabItem value="oop" label="Classes" default>
1818

1919
```ts
20-
/** @gqlQueryField */
21-
export function me(): User {
22-
return new User();
23-
}
24-
2520
/**
2621
* A user in our kick-ass system!
2722
* @gqlType */
2823
class User {
24+
/** @gqlQueryField */
25+
static me(): User {
26+
return new User();
27+
}
28+
2929
/** @gqlField */
3030
name: string = "Alice";
3131

0 commit comments

Comments
 (0)