Skip to content

Commit 58c7fa9

Browse files
committed
Parse the POST "variables" if it is a string.
1 parent af16a4d commit 58c7fa9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ProcessGraphQL.module

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@ class ProcessGraphQL extends Process implements Module {
152152
$payload = isset($requestData['payload']) ? $requestData['payload'] : null;
153153
}
154154
$variables = isset($requestData['variables']) ? $requestData['variables'] : null;
155+
156+
// in case the post is a form data, parse the variables string.
157+
if (is_string($variables)) {
158+
$variables = json_decode($variables, true);
159+
}
155160
return [
156161
'payload' => $payload,
157162
'variables' => $variables

0 commit comments

Comments
 (0)