Skip to content

Commit 8cb1bc6

Browse files
committed
Break it
1 parent f1754b0 commit 8cb1bc6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/api2/schema.graphql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@ type Query {
44

55
type Object2 {
66
id: ID!
7+
anotherRelation: Object3!
8+
}
9+
10+
type Object3 {
11+
id: ID!
12+
isActive: Boolean!
713
}

src/resolvers.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ const resolvers: Resolvers = {
1414
}
1515
}).then((data) => {
1616
console.log(data);
17+
if (!data.anotherRelation.isActive) {
18+
return null;
19+
}
1720
return data;
1821
});
1922
}

0 commit comments

Comments
 (0)