We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 871a1b4 commit abcb8faCopy full SHA for abcb8fa
tests/src/Kernel/ResolverBuilderTest.php
@@ -231,6 +231,26 @@ public function testFromContext(): void {
231
$this->assertResults($query, [], ['tree' => ['context' => ['myContext' => 'my context value']]]);
232
}
233
234
+ /**
235
+ * @covers ::cond
236
+ */
237
+ public function testSingleCond(): void {
238
+ $this->mockResolver('Query', 'me', $this->builder->cond([
239
+ [
240
+ $this->builder->fromValue(FALSE),
241
+ $this->builder->fromValue('This should resolve into null.'),
242
+ ],
243
+ ]));
244
+
245
+ $query = <<<GQL
246
+ query {
247
+ me
248
+ }
249
+GQL;
250
251
+ $this->assertResults($query, [], ['me' => NULL]);
252
253
254
/**
255
* @covers ::cond
256
*/
0 commit comments