All in GraphQL #34

Merged
timw4mail merged 87 commits from develop into master 2020-12-01 10:07:49 -05:00
3 changed files with 19 additions and 23 deletions
Showing only changes of commit e06cc16890 - Show all commits

View File

@ -48,7 +48,7 @@ final class Model {
use MangaTrait; use MangaTrait;
use MutationTrait; use MutationTrait;
protected const LIST_PAGE_SIZE = 100; protected const LIST_PAGE_SIZE = 75;
/** /**
* @var ListItem * @var ListItem
@ -367,7 +367,7 @@ final class Model {
'kind' => $type, 'kind' => $type,
], ],
'include' => "{$type},{$type}.mappings", 'include' => "{$type},{$type}.mappings",
'sort' => '-updated_at' // 'sort' => '-updated_at'
]; ];
return $this->getRawSyncList($type, $options); return $this->getRawSyncList($type, $options);

View File

@ -363,15 +363,18 @@ final class RequestBuilder extends APIRequestBuilder {
// Any other type of failed request // Any other type of failed request
if ($statusCode > 299 || $statusCode < 200) if ($statusCode > 299 || $statusCode < 200)
{ {
if ($logger) $logger->warning('Non 2xx response for api call', (array)$response);
{
$logger->warning('Non 2xx response for api call', (array)$response);
}
dump($rawBody);
die();
// throw new FailedResponseException('Failed to get the proper response from the API');
} }
return Json::decode($rawBody); try
{
return Json::decode($rawBody);
}
catch (JsonException $e)
{
// dump($e);
dump($rawBody);
die();
}
} }
} }

View File

@ -54,22 +54,15 @@ abstract class BaseCommand extends Command {
$message = implode("\n", $message); $message = implode("\n", $message);
} }
try // color message
{ $message = Colors::colorize($message, $fgColor, $bgColor);
// color message
$message = Colors::colorize($message, $fgColor, $bgColor);
// create the box // create the box
$box = new Box($this->getConsole(), $message); $box = new Box($this->getConsole(), $message);
$box->write(); $box->write();
echo "\n"; echo "\n";
}
catch (ConsoleException $e)
{
// oops
}
} }
public function echo(string $message): void public function echo(string $message): void