1
0
Fork 0
mirror of synced 2024-10-01 17:58:02 +13:00

Fix parameters

This commit is contained in:
Jake Barnby 2022-07-13 17:06:48 +12:00
parent 3f2037a906
commit 4732127777
2 changed files with 5 additions and 5 deletions

View file

@ -27,7 +27,7 @@ App::get('/v1/graphql')
->label('sdk.response.model', Response::MODEL_ANY) ->label('sdk.response.model', Response::MODEL_ANY)
->label('abuse-limit', 60) ->label('abuse-limit', 60)
->label('abuse-time', 60) ->label('abuse-time', 60)
->param('query', '', new JSON(), 'The query or queries to execute.', body: true) ->param('query', '', new JSON(), 'The query or queries to execute.', fullBody: true)
->inject('request') ->inject('request')
->inject('response') ->inject('response')
->inject('utopia') ->inject('utopia')
@ -50,7 +50,7 @@ App::post('/v1/graphql')
->label('sdk.response.model', Response::MODEL_ANY) ->label('sdk.response.model', Response::MODEL_ANY)
->label('abuse-limit', 60) ->label('abuse-limit', 60)
->label('abuse-time', 60) ->label('abuse-time', 60)
->param('query', '', new JSON(), 'The query or queries to execute.', body: true) ->param('query', '', new JSON(), 'The query or queries to execute.', fullBody: true)
->inject('request') ->inject('request')
->inject('response') ->inject('response')
->inject('promiseAdapter') ->inject('promiseAdapter')
@ -121,8 +121,8 @@ function graphqlRequest(
$promiseAdapter, $promiseAdapter,
$gqlSchema, $gqlSchema,
$indexed['query'], $indexed['query'],
variableValues: $indexed['variables'], variableValues: $indexed['variables'] ?? null,
operationName: $indexed['operationName'], operationName: $indexed['operationName'] ?? null,
validationRules: $validations validationRules: $validations
); );
} }

View file

@ -8,7 +8,7 @@ use Tests\E2E\Scopes\ProjectCustom;
use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideServer; use Tests\E2E\Scopes\SideServer;
class GraphQLBodyTypeTest extends Scope class GraphQLContentTypeTest extends Scope
{ {
use ProjectCustom; use ProjectCustom;
use SideServer; use SideServer;