@@ -164,19 +164,19 @@ |
||
164 | 164 | $this->assertEquals(['data' => ['me' => ['firstName' => 'JOHN']]], $processor->getResponseData()); |
165 | 165 | |
166 | 166 | $schema->getMutationType() |
167 | - ->addField(new Field([ |
|
168 | - 'name' => 'increaseCounter', |
|
169 | - 'type' => new IntType(), |
|
170 | - 'resolve' => function ($value, $args, ResolveInfo $info) { |
|
171 | - return $this->_counter += $args['amount']; |
|
172 | - }, |
|
173 | - 'args' => [ |
|
174 | - 'amount' => [ |
|
175 | - 'type' => new IntType(), |
|
176 | - 'default' => 1 |
|
177 | - ] |
|
178 | - ] |
|
179 | - ]))->addField(new Field([ |
|
167 | + ->addField(new Field([ |
|
168 | + 'name' => 'increaseCounter', |
|
169 | + 'type' => new IntType(), |
|
170 | + 'resolve' => function ($value, $args, ResolveInfo $info) { |
|
171 | + return $this->_counter += $args['amount']; |
|
172 | + }, |
|
173 | + 'args' => [ |
|
174 | + 'amount' => [ |
|
175 | + 'type' => new IntType(), |
|
176 | + 'default' => 1 |
|
177 | + ] |
|
178 | + ] |
|
179 | + ]))->addField(new Field([ |
|
180 | 180 | 'name' => 'invalidResolveTypeMutation', |
181 | 181 | 'type' => new NonNullType(new IntType()), |
182 | 182 | 'resolve' => function () { |
@@ -65,18 +65,18 @@ |
||
65 | 65 | |
66 | 66 | public function testValidFragmentTypeWithComposite() |
67 | 67 | { |
68 | - $validator = new ResolveValidator(new ExecutionContext(new TestSchema())); |
|
69 | - $userType = new ObjectType([ |
|
68 | + $validator = new ResolveValidator(new ExecutionContext(new TestSchema())); |
|
69 | + $userType = new ObjectType([ |
|
70 | 70 | 'name' => 'User', |
71 | 71 | 'fields' => [ |
72 | - 'name' => new StringType(), |
|
72 | + 'name' => new StringType(), |
|
73 | 73 | ], |
74 | 74 | 'interfaces' => [new TestInterfaceType()] |
75 | - ]); |
|
75 | + ]); |
|
76 | 76 | |
77 | - $fragment = new Fragment('name', 'User', []); |
|
78 | - $fragmentReference = new FragmentReference('name'); |
|
79 | - $validator->assertValidFragmentForField($fragment, $fragmentReference, new NonNullType($userType)); |
|
77 | + $fragment = new Fragment('name', 'User', []); |
|
78 | + $fragmentReference = new FragmentReference('name'); |
|
79 | + $validator->assertValidFragmentForField($fragment, $fragmentReference, new NonNullType($userType)); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |