File tree Expand file tree Collapse file tree 2 files changed +9
-16
lines changed
src/test-suites/i-will-name-you-later Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -15,18 +15,18 @@ export default createSubgraph("a", {
15
15
16
16
type Post @key(fields: "id") {
17
17
id: ID!
18
- comments(limit: Int!): [Comment] @external
18
+ authorId: ID @external
19
+ author: Author @requires(fields: "authorId")
19
20
}
20
21
21
22
type Comment @key(fields: "id") {
22
23
id: ID!
23
24
authorId: ID
24
- body: String!
25
- sameCommentOnOtherPosts: [Post] @external
26
- isCommentSpam: Boolean
27
- @requires(
28
- fields: "sameCommentOnOtherPosts { comments(limit: 50) { id } }"
29
- )
25
+ }
26
+
27
+ type Author {
28
+ id: ID!
29
+ name: String
30
30
}
31
31
` ,
32
32
resolvers : {
Original file line number Diff line number Diff line change @@ -11,20 +11,13 @@ export default createSubgraph("b", {
11
11
12
12
type Post @key(fields: "id") {
13
13
id: ID!
14
- author: Author @requires(fields: "comments(limit: 3) { authorId }")
15
- comments(limit: Int!): [ Comment]
14
+ authorId: ID @requires(fields: "comments { authorId }")
15
+ comments: Comment
16
16
}
17
17
18
18
type Comment @key(fields: "id") {
19
19
id: ID!
20
- date: String
21
20
authorId: ID @external
22
- sameCommentOnOtherPosts: [Post]
23
- }
24
-
25
- type Author {
26
- id: ID!
27
- name: String
28
21
}
29
22
` ,
30
23
resolvers : {
You can’t perform that action at this time.
0 commit comments