| @@ 90-107 (lines=18) @@ | ||
| 87 | $this->assertArrayNotHasKey('errors', $processor->getResponseData()); |
|
| 88 | } |
|
| 89 | ||
| 90 | public function testListNullResponse() |
|
| 91 | { |
|
| 92 | $processor = new Processor(new Schema([ |
|
| 93 | 'query' => new ObjectType([ |
|
| 94 | 'name' => 'RootQuery', |
|
| 95 | 'fields' => [ |
|
| 96 | 'list' => [ |
|
| 97 | 'type' => new ListType(new StringType()), |
|
| 98 | 'resolve' => function () { |
|
| 99 | return null; |
|
| 100 | } |
|
| 101 | ] |
|
| 102 | ] |
|
| 103 | ]) |
|
| 104 | ])); |
|
| 105 | $data = $processor->processPayload(' { list }')->getResponseData(); |
|
| 106 | $this->assertEquals(['data' => ['list' => null]], $data); |
|
| 107 | } |
|
| 108 | ||
| 109 | ||
| 110 | public function testSubscriptionNullResponse() |
|
| @@ 110-127 (lines=18) @@ | ||
| 107 | } |
|
| 108 | ||
| 109 | ||
| 110 | public function testSubscriptionNullResponse() |
|
| 111 | { |
|
| 112 | $processor = new Processor(new Schema([ |
|
| 113 | 'query' => new ObjectType([ |
|
| 114 | 'name' => 'RootQuery', |
|
| 115 | 'fields' => [ |
|
| 116 | 'list' => [ |
|
| 117 | 'type' => new ListType(new StringType()), |
|
| 118 | 'resolve' => function () { |
|
| 119 | return null; |
|
| 120 | } |
|
| 121 | ] |
|
| 122 | ] |
|
| 123 | ]) |
|
| 124 | ])); |
|
| 125 | $data = $processor->processPayload(' { __schema { subscriptionType { name } } }')->getResponseData(); |
|
| 126 | $this->assertEquals(['data' => ['__schema' => ['subscriptionType' => null]]], $data); |
|
| 127 | } |
|
| 128 | ||
| 129 | public function testSchemaOperations() |
|
| 130 | { |
|