1
0
Fork 0
mirror of synced 2024-06-28 19:20:25 +12:00
This commit is contained in:
Jake Barnby 2022-07-13 17:21:41 +12:00
parent 4732127777
commit ac8e47ac2d
3 changed files with 10 additions and 8 deletions

View file

@ -100,7 +100,7 @@ function graphqlRequest(
if (empty($query)) {
throw new Exception('No query supplied.', 400, Exception::GRAPHQL_NO_QUERY);
}
$maxComplexity = App::getEnv('_APP_GRAPHQL_MAX_QUERY_COMPLEXITY', 200);
$maxDepth = App::getEnv('_APP_GRAPHQL_MAX_QUERY_DEPTH', 3);
@ -114,9 +114,9 @@ function graphqlRequest(
} else {
$debugFlags = DebugFlag::NONE;
}
$promises = [];
foreach($query as $indexed) {
foreach ($query as $indexed) {
$promises[] = GraphQL::promiseToExecute(
$promiseAdapter,
$gqlSchema,

View file

@ -300,9 +300,11 @@ class Builder
$collectionSchemaDirty = $register->has('schemaDirty') && $register->get('schemaDirty');
$apiSchemaDirty = \version_compare($envVersion, $schemaVersion, "!=");
if (!$collectionSchemaDirty
if (
!$collectionSchemaDirty
&& !$apiSchemaDirty
&& $register->has('fullSchema')) {
&& $register->has('fullSchema')
) {
$timeElapsedMillis = (microtime(true) - $start) * 1000;
$timeElapsedMillis = \number_format((float) $timeElapsedMillis, 3, '.', '');
Console::info('[INFO] Fetched GraphQL Schema in ' . $timeElapsedMillis . 'ms');

View file

@ -87,9 +87,9 @@ class GraphQLContentTypeTest extends Scope
'content-type' => 'application/json',
'x-appwrite-project' => $projectId,
], $this->getHeaders()), $gqlPayload);
$bucket = $bucket['body']['data']['storageCreateBucket'];
$query = $this->getQuery(self::$CREATE_FILE);
$gqlPayload = [
'operations' => \json_encode([
@ -118,4 +118,4 @@ class GraphQLContentTypeTest extends Scope
$this->assertArrayNotHasKey('errors', $file['body']);
$this->assertIsArray($file['body']['data']['storageCreateFile']);
}
}
}