Skip to content

Commit 42a6ec3

Browse files
committed
Set graphql header if method type is graphql
1 parent 643e409 commit 42a6ec3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Spec/Swagger2.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ public function getMethods($service)
185185
'responseModel' => $responseModel,
186186
];
187187

188+
if ($output['type'] == 'graphql') {
189+
$output['headers']['x-sdk-graphql'] = "true";
190+
}
191+
188192
if (isset($method['consumes']) && is_array($method['consumes'])) {
189193
foreach ($method['consumes'] as $consume) {
190194
$output['headers']['content-type'] = $consume;

0 commit comments

Comments
 (0)