Skip to content

Commit acffc42

Browse files
authored
added php tag for syntax highlighting
1 parent 62578de commit acffc42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/state-processors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ If you want to execute custom business logic before or after persistence, this c
141141

142142
For GraphQL a remove Operation type will not be `DeleteOperationInterface` type but `ApiPlatform\Metadata\GraphQl\Mutation` with a `getName()` result of "delete". You can insert this to use the `$removeProcessor`. However, API Platform will not return the object in this case (which is required in the GraphQL schema on a delete op) so you'll need to create a temporary object to return:
143143

144-
```
144+
```php
145145
if ($operation instanceof \ApiPlatform\Metadata\GraphQl\Mutation && $operation->getName() === 'delete') {
146146
$returnEntity = clone $data;
147147
$this->removeProcessor->process($data, $operation, $uriVariables, $context);

0 commit comments

Comments
 (0)