Skip to content

Commit 43c3841

Browse files
committed
simplify++
1 parent 3d126a3 commit 43c3841

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

src/test-suites/i-will-name-you-later/a.subgraph.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,13 @@ export default createSubgraph("a", {
1515
1616
type Post @key(fields: "id") {
1717
id: ID!
18-
authorId: ID @external
19-
author: Author @requires(fields: "authorId")
18+
isJohn: Boolean @external
19+
isNotJohn: Boolean @requires(fields: "isJohn")
2020
}
2121
22-
type Comment @key(fields: "id") {
22+
type Author @key(fields: "id") {
2323
id: ID!
24-
authorId: ID
25-
}
26-
27-
type Author {
28-
id: ID!
29-
name: String
24+
name: String!
3025
}
3126
`,
3227
resolvers: {

src/test-suites/i-will-name-you-later/b.subgraph.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ export default createSubgraph("b", {
1111
1212
type Post @key(fields: "id") {
1313
id: ID!
14-
authorId: ID @requires(fields: "comments { authorId }")
15-
comments: Comment
14+
author: Author
15+
isJohn: Boolean @requires(fields: "author { name }")
1616
}
1717
18-
type Comment @key(fields: "id") {
18+
type Author @key(fields: "id") {
1919
id: ID!
20-
authorId: ID @external
20+
name: String! @external
2121
}
2222
`,
2323
resolvers: {

0 commit comments

Comments
 (0)