From 696fe903fcc0658595646a6382fe87583d15b307 Mon Sep 17 00:00:00 2001 From: Qziem Date: Sun, 24 Mar 2019 14:02:34 +0100 Subject: [PATCH 01/10] Pierwsze testowe api graphql! --- be/Api/index.php | 3 + be/Controller/GraphQLCtrl.php | 67 +++++++++++++++++++++++ be/GraphQLElo/Resolvers/UsersResolver.php | 10 ++++ be/GraphQLElo/Types/UsersType.php | 22 ++++++++ be/composer.json | 3 +- be/composer.lock | 61 +++++++++++++++++++-- 6 files changed, 161 insertions(+), 5 deletions(-) create mode 100644 be/Controller/GraphQLCtrl.php create mode 100644 be/GraphQLElo/Resolvers/UsersResolver.php create mode 100644 be/GraphQLElo/Types/UsersType.php diff --git a/be/Api/index.php b/be/Api/index.php index 2e3b833..a65dd6b 100644 --- a/be/Api/index.php +++ b/be/Api/index.php @@ -6,6 +6,7 @@ use Controller\AuthCtrl; use Controller\RatingsHistoryCtrl; use Controller\RemoveGameCtrl; +use Controller\GraphQLCtrl; use Middleware\Privileges\PrivilegesIsLogged; use Middleware\Validation; @@ -13,6 +14,8 @@ $app = new EloApp; +$app->post('/graphql', [GraphQLCtrl::class, 'api']); + $app->get('/auth/isLogged', [AuthCtrl::class, 'isLogged']); $app->post('/auth/login', [AuthCtrl::class, 'login']); diff --git a/be/Controller/GraphQLCtrl.php b/be/Controller/GraphQLCtrl.php new file mode 100644 index 0000000..a6da65b --- /dev/null +++ b/be/Controller/GraphQLCtrl.php @@ -0,0 +1,67 @@ +usersResolver = $usersResolver; + $this->usersType = $usersType; + } + + public function api(Request $request, Response $response): Response { + $schema = new Schema([ + 'query' => new ObjectType([ + 'name' => 'Query', + 'fields' => $this->getQueryFields(), + ]), + ]); + + $rawInput = $request->getBody(); + $input = json_decode($rawInput, true); + $query = $input['query']; + $variableValues = isset($input['variables']) ? $input['variables'] : null; + + try { + $result = GraphQL::executeQuery($schema, $query, null, null, $variableValues); + $output = $result->toArray(); + } catch (\Exception $e) { + $output = [ + 'errors' => [ + [ + 'message' => $e->getMessage() + ] + ] + ]; + } + + return $response->withJson($output); + } + + private function getQueryFields() { + return [ + 'users' => [ + 'type' => $this->usersType, + 'args' => [ + 'message' => Type::nonNull(Type::string()), + ], + 'resolve' => $this->usersResolver, + ], + ]; + } +} + \ No newline at end of file diff --git a/be/GraphQLElo/Resolvers/UsersResolver.php b/be/GraphQLElo/Resolvers/UsersResolver.php new file mode 100644 index 0000000..19796dd --- /dev/null +++ b/be/GraphQLElo/Resolvers/UsersResolver.php @@ -0,0 +1,10 @@ + [ + 'code' => [ + 'type' => Type::string(), + 'resolve' => function ($root) { return $root . "bb"; }, + ] + ], + + ]; + parent::__construct($config); + } + +} diff --git a/be/composer.json b/be/composer.json index a378282..0ceb7f0 100644 --- a/be/composer.json +++ b/be/composer.json @@ -9,7 +9,8 @@ "php": "7.2.*", "ext-json": "*", "doctrine/orm": "2.6.3", - "php-di/slim-bridge": "^2.0" + "php-di/slim-bridge": "^2.0", + "webonyx/graphql-php": "^0.13.1" }, "require-dev": { "roave/security-advisories": "dev-master" diff --git a/be/composer.lock b/be/composer.lock index 43e5441..9b5821d 100644 --- a/be/composer.lock +++ b/be/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "095cd8d1d2fce38077d4684c4a2337a3", + "content-hash": "3ba3ec8e17626bddcdbba23b8c1a2348", "packages": [ { "name": "container-interop/container-interop", @@ -664,12 +664,12 @@ "version": "v2.6.3", "source": { "type": "git", - "url": "https://github.com/doctrine/doctrine2.git", + "url": "https://github.com/doctrine/orm.git", "reference": "434820973cadf2da2d66e7184be370084cc32ca8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/434820973cadf2da2d66e7184be370084cc32ca8", + "url": "https://api.github.com/repos/doctrine/orm/zipball/434820973cadf2da2d66e7184be370084cc32ca8", "reference": "434820973cadf2da2d66e7184be370084cc32ca8", "shasum": "" }, @@ -1755,6 +1755,58 @@ "shim" ], "time": "2018-09-30T16:36:12+00:00" + }, + { + "name": "webonyx/graphql-php", + "version": "v0.13.1", + "source": { + "type": "git", + "url": "https://github.com/webonyx/graphql-php.git", + "reference": "0226b08429e5a102ea99cda9ddc4a7185006473f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/0226b08429e5a102ea99cda9ddc4a7185006473f", + "reference": "0226b08429e5a102ea99cda9ddc4a7185006473f", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": "^7.1||^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^5.0", + "phpbench/phpbench": "^0.14.0", + "phpstan/phpstan": "0.10.5", + "phpstan/phpstan-phpunit": "0.10.0", + "phpstan/phpstan-strict-rules": "0.10.1", + "phpunit/phpcov": "^5.0", + "phpunit/phpunit": "^7.2", + "psr/http-message": "^1.0", + "react/promise": "2.*" + }, + "suggest": { + "psr/http-message": "To use standard GraphQL server", + "react/promise": "To leverage async resolving on React PHP platform" + }, + "type": "library", + "autoload": { + "psr-4": { + "GraphQL\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP port of GraphQL reference implementation", + "homepage": "https://github.com/webonyx/graphql-php", + "keywords": [ + "api", + "graphql" + ], + "time": "2019-03-09T15:34:29+00:00" } ], "packages-dev": [ @@ -1969,7 +2021,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "7.2.*" + "php": "7.2.*", + "ext-json": "*" }, "platform-dev": [], "platform-overrides": { From f82a0707a865e4e8d6d2291787982efd4dbde304 Mon Sep 17 00:00:00 2001 From: Qziem Date: Sun, 24 Mar 2019 14:20:01 +0100 Subject: [PATCH 02/10] =?UTF-8?q?Stworzenie=20w=C4=99z=C5=82a=20users?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- be/Controller/GraphQLCtrl.php | 7 ++--- be/GraphQLElo/Resolvers/UsersResolver.php | 15 +++++++-- be/GraphQLElo/Types/UsersType.php | 37 +++++++++++++++++++++-- be/Service/UsersSvc.php | 2 +- 4 files changed, 50 insertions(+), 11 deletions(-) diff --git a/be/Controller/GraphQLCtrl.php b/be/Controller/GraphQLCtrl.php index a6da65b..3ce6684 100644 --- a/be/Controller/GraphQLCtrl.php +++ b/be/Controller/GraphQLCtrl.php @@ -5,9 +5,9 @@ use Slim\Http\Response; use \Psr\Http\Message\ServerRequestInterface as Request; use GraphQL\Type\Definition\ObjectType; -use GraphQL\Type\Definition\Type; use GraphQL\GraphQL; use GraphQL\Type\Schema; +use GraphQL\Type\Definition\Type; use GraphQLElo\Resolvers\UsersResolver; use GraphQLElo\Types\UsersType; @@ -55,10 +55,7 @@ public function api(Request $request, Response $response): Response { private function getQueryFields() { return [ 'users' => [ - 'type' => $this->usersType, - 'args' => [ - 'message' => Type::nonNull(Type::string()), - ], + 'type' => Type::listOf($this->usersType), 'resolve' => $this->usersResolver, ], ]; diff --git a/be/GraphQLElo/Resolvers/UsersResolver.php b/be/GraphQLElo/Resolvers/UsersResolver.php index 19796dd..1143624 100644 --- a/be/GraphQLElo/Resolvers/UsersResolver.php +++ b/be/GraphQLElo/Resolvers/UsersResolver.php @@ -2,9 +2,20 @@ namespace GraphQLElo\Resolvers; +use Service\UsersSvc; + class UsersResolver { - public function __invoke($root, $args): String { - return $args['message']; + /** @var UsersSvc */ + private $usersSvc; + + public function __construct(UsersSvc $usersSvc) + { + $this->usersSvc = $usersSvc; + } + + public function __invoke(): array + { + return $this->usersSvc->getUsers(); } } \ No newline at end of file diff --git a/be/GraphQLElo/Types/UsersType.php b/be/GraphQLElo/Types/UsersType.php index 698c742..44f9fcc 100644 --- a/be/GraphQLElo/Types/UsersType.php +++ b/be/GraphQLElo/Types/UsersType.php @@ -9,12 +9,43 @@ class UsersType extends ObjectType { public function __construct() { $config = [ 'fields' => [ + 'userNid' => [ + 'type' => Type::int(), + 'resolve' => function ($root) { + return $root['userNid']; + }, + ], 'code' => [ 'type' => Type::string(), - 'resolve' => function ($root) { return $root . "bb"; }, - ] + 'resolve' => function ($root) { + return $root['code']; + }, + ], + 'name' => [ + 'type' => Type::string(), + 'resolve' => function ($root) { + return $root['name']; + }, + ], + 'rating' => [ + 'type' => Type::string(), + 'resolve' => function ($root) { + return $root['code']; + }, + ], + 'team' => [ + 'type' => Type::string(), + 'resolve' => function ($root) { + return $root['code']; + }, + ], + 'trendRatingDiff' => [ + 'type' => Type::string(), + 'resolve' => function ($root) { + return $root['code']; + }, + ], ], - ]; parent::__construct($config); } diff --git a/be/Service/UsersSvc.php b/be/Service/UsersSvc.php index 0cb9288..d11ad99 100644 --- a/be/Service/UsersSvc.php +++ b/be/Service/UsersSvc.php @@ -29,7 +29,7 @@ public function __construct( $this->userRepository = $userRepository; $this->gameFactory = $gameFactory; } - + public function getUsers(): array { $userEntityList = $this->userRepository->findBy( From 80f6fc3f9cd75115e9710a8f4a958921be0588fb Mon Sep 17 00:00:00 2001 From: Qziem Date: Sun, 24 Mar 2019 14:23:19 +0100 Subject: [PATCH 03/10] Popraweczki --- be/Api/index.php | 3 ++- be/GraphQLElo/Types/UsersType.php | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/be/Api/index.php b/be/Api/index.php index a65dd6b..6743cdf 100644 --- a/be/Api/index.php +++ b/be/Api/index.php @@ -14,7 +14,8 @@ $app = new EloApp; -$app->post('/graphql', [GraphQLCtrl::class, 'api']); +$app->post('/graphql', [GraphQLCtrl::class, 'api']) + ->add(PrivilegesIsLogged::class); $app->get('/auth/isLogged', [AuthCtrl::class, 'isLogged']); diff --git a/be/GraphQLElo/Types/UsersType.php b/be/GraphQLElo/Types/UsersType.php index 44f9fcc..2a358f2 100644 --- a/be/GraphQLElo/Types/UsersType.php +++ b/be/GraphQLElo/Types/UsersType.php @@ -28,21 +28,21 @@ public function __construct() { }, ], 'rating' => [ - 'type' => Type::string(), + 'type' => Type::int(), 'resolve' => function ($root) { - return $root['code']; + return $root['rating']; }, ], 'team' => [ 'type' => Type::string(), 'resolve' => function ($root) { - return $root['code']; + return $root['team']; }, ], 'trendRatingDiff' => [ - 'type' => Type::string(), + 'type' => Type::int(), 'resolve' => function ($root) { - return $root['code']; + return $root['trendRatingDiff']; }, ], ], From ff2aaf0dc5552bb1f1d006dfd6ebb7a812d35d17 Mon Sep 17 00:00:00 2001 From: Qziem Date: Sun, 24 Mar 2019 18:29:36 +0100 Subject: [PATCH 04/10] =?UTF-8?q?Strza=C5=82y=20graphqlowe=20z=20fe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + be/Controller/GraphQLCtrl.php | 2 +- be/GraphQLElo/Types/UsersType.php | 12 +- fe/bsconfig.json | 6 +- fe/graphql_schema.json | 1211 +++++++++++++++++ fe/package.json | 2 + .../components/RankAndStats/RankAndStats.re | 65 +- fe/src/utils/GraphQL/Client.re | 6 + fe/yarn.lock | 508 ++++++- 9 files changed, 1795 insertions(+), 18 deletions(-) create mode 100644 fe/graphql_schema.json create mode 100644 fe/src/utils/GraphQL/Client.re diff --git a/.gitignore b/.gitignore index 874528e..d456c36 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ node_modules/ /fe/build/ /fe/yarn-error.log /fe/.vs/ +/fe/.graphql_ppx_cache/ /be/vendor/ /be/config.php /be/config_cba.php diff --git a/be/Controller/GraphQLCtrl.php b/be/Controller/GraphQLCtrl.php index 3ce6684..1b44cf0 100644 --- a/be/Controller/GraphQLCtrl.php +++ b/be/Controller/GraphQLCtrl.php @@ -55,7 +55,7 @@ public function api(Request $request, Response $response): Response { private function getQueryFields() { return [ 'users' => [ - 'type' => Type::listOf($this->usersType), + 'type' => Type::nonNull(Type::listOf(Type::nonNull($this->usersType))), 'resolve' => $this->usersResolver, ], ]; diff --git a/be/GraphQLElo/Types/UsersType.php b/be/GraphQLElo/Types/UsersType.php index 2a358f2..fababb5 100644 --- a/be/GraphQLElo/Types/UsersType.php +++ b/be/GraphQLElo/Types/UsersType.php @@ -10,37 +10,37 @@ public function __construct() { $config = [ 'fields' => [ 'userNid' => [ - 'type' => Type::int(), + 'type' => Type::nonNull(Type::int()), 'resolve' => function ($root) { return $root['userNid']; }, ], 'code' => [ - 'type' => Type::string(), + 'type' => Type::nonNull(Type::string()), 'resolve' => function ($root) { return $root['code']; }, ], 'name' => [ - 'type' => Type::string(), + 'type' => Type::nonNull(Type::string()), 'resolve' => function ($root) { return $root['name']; }, ], 'rating' => [ - 'type' => Type::int(), + 'type' => Type::nonNull(Type::int()), 'resolve' => function ($root) { return $root['rating']; }, ], 'team' => [ - 'type' => Type::string(), + 'type' => Type::nonNull(Type::string()), 'resolve' => function ($root) { return $root['team']; }, ], 'trendRatingDiff' => [ - 'type' => Type::int(), + 'type' => Type::nonNull(Type::int()), 'resolve' => function ($root) { return $root['trendRatingDiff']; }, diff --git a/fe/bsconfig.json b/fe/bsconfig.json index 8f535c6..518861e 100644 --- a/fe/bsconfig.json +++ b/fe/bsconfig.json @@ -21,7 +21,11 @@ "@glennsl/bs-json", "@ahrefs/bs-reactstrap", "@ahrefs/bs-recharts", - "reason-react-document-title" + "reason-react-document-title", + "reason-apollo" + ], + "ppx-flags": [ + "graphql_ppx/ppx" ], "refmt": 3 } \ No newline at end of file diff --git a/fe/graphql_schema.json b/fe/graphql_schema.json new file mode 100644 index 0000000..403ecbd --- /dev/null +++ b/fe/graphql_schema.json @@ -0,0 +1,1211 @@ +{ + "data":{ + "__schema":{ + "queryType":{ + "name":"Query" + }, + "mutationType":null, + "subscriptionType":null, + "types":[ + { + "kind":"OBJECT", + "name":"Query", + "description":null, + "fields":[ + { + "name":"users", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"LIST", + "name":null, + "ofType":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"OBJECT", + "name":"Users", + "ofType":null + } + } + } + }, + "isDeprecated":false, + "deprecationReason":null + } + ], + "inputFields":null, + "interfaces":[ + + ], + "enumValues":null, + "possibleTypes":null + }, + { + "kind":"OBJECT", + "name":"Users", + "description":null, + "fields":[ + { + "name":"userNid", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"Int", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"code", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"name", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"rating", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"Int", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"team", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"trendRatingDiff", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"Int", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + } + ], + "inputFields":null, + "interfaces":[ + + ], + "enumValues":null, + "possibleTypes":null + }, + { + "kind":"SCALAR", + "name":"Int", + "description":"The `Int` scalar type represents non-fractional signed whole numeric\nvalues. Int can represent values between -(2^31) and 2^31 - 1. ", + "fields":null, + "inputFields":null, + "interfaces":null, + "enumValues":null, + "possibleTypes":null + }, + { + "kind":"SCALAR", + "name":"String", + "description":"The `String` scalar type represents textual data, represented as UTF-8\ncharacter sequences. The String type is most often used by GraphQL to\nrepresent free-form human-readable text.", + "fields":null, + "inputFields":null, + "interfaces":null, + "enumValues":null, + "possibleTypes":null + }, + { + "kind":"SCALAR", + "name":"ID", + "description":"The `ID` scalar type represents a unique identifier, often used to\nrefetch an object or as key for a cache. The ID type appears in a JSON\nresponse as a String; however, it is not intended to be human-readable.\nWhen expected as an input type, any string (such as `\"4\"`) or integer\n(such as `4`) input value will be accepted as an ID.", + "fields":null, + "inputFields":null, + "interfaces":null, + "enumValues":null, + "possibleTypes":null + }, + { + "kind":"SCALAR", + "name":"Float", + "description":"The `Float` scalar type represents signed double-precision fractional\nvalues as specified by\n[IEEE 754](http:\/\/en.wikipedia.org\/wiki\/IEEE_floating_point). ", + "fields":null, + "inputFields":null, + "interfaces":null, + "enumValues":null, + "possibleTypes":null + }, + { + "kind":"SCALAR", + "name":"Boolean", + "description":"The `Boolean` scalar type represents `true` or `false`.", + "fields":null, + "inputFields":null, + "interfaces":null, + "enumValues":null, + "possibleTypes":null + }, + { + "kind":"OBJECT", + "name":"__Schema", + "description":"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", + "fields":[ + { + "name":"types", + "description":"A list of all types supported by this server.", + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"LIST", + "name":null, + "ofType":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"OBJECT", + "name":"__Type", + "ofType":null + } + } + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"queryType", + "description":"The type that query operations will be rooted at.", + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"OBJECT", + "name":"__Type", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"mutationType", + "description":"If this server supports mutation, the type that mutation operations will be rooted at.", + "args":[ + + ], + "type":{ + "kind":"OBJECT", + "name":"__Type", + "ofType":null + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"subscriptionType", + "description":"If this server support subscription, the type that subscription operations will be rooted at.", + "args":[ + + ], + "type":{ + "kind":"OBJECT", + "name":"__Type", + "ofType":null + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"directives", + "description":"A list of all directives supported by this server.", + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"LIST", + "name":null, + "ofType":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"OBJECT", + "name":"__Directive", + "ofType":null + } + } + } + }, + "isDeprecated":false, + "deprecationReason":null + } + ], + "inputFields":null, + "interfaces":[ + + ], + "enumValues":null, + "possibleTypes":null + }, + { + "kind":"OBJECT", + "name":"__Type", + "description":"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", + "fields":[ + { + "name":"kind", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"ENUM", + "name":"__TypeKind", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"name", + "description":null, + "args":[ + + ], + "type":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"description", + "description":null, + "args":[ + + ], + "type":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"fields", + "description":null, + "args":[ + { + "name":"includeDeprecated", + "description":null, + "type":{ + "kind":"SCALAR", + "name":"Boolean", + "ofType":null + }, + "defaultValue":"false" + } + ], + "type":{ + "kind":"LIST", + "name":null, + "ofType":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"OBJECT", + "name":"__Field", + "ofType":null + } + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"interfaces", + "description":null, + "args":[ + + ], + "type":{ + "kind":"LIST", + "name":null, + "ofType":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"OBJECT", + "name":"__Type", + "ofType":null + } + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"possibleTypes", + "description":null, + "args":[ + + ], + "type":{ + "kind":"LIST", + "name":null, + "ofType":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"OBJECT", + "name":"__Type", + "ofType":null + } + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"enumValues", + "description":null, + "args":[ + { + "name":"includeDeprecated", + "description":null, + "type":{ + "kind":"SCALAR", + "name":"Boolean", + "ofType":null + }, + "defaultValue":"false" + } + ], + "type":{ + "kind":"LIST", + "name":null, + "ofType":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"OBJECT", + "name":"__EnumValue", + "ofType":null + } + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"inputFields", + "description":null, + "args":[ + + ], + "type":{ + "kind":"LIST", + "name":null, + "ofType":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"OBJECT", + "name":"__InputValue", + "ofType":null + } + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"ofType", + "description":null, + "args":[ + + ], + "type":{ + "kind":"OBJECT", + "name":"__Type", + "ofType":null + }, + "isDeprecated":false, + "deprecationReason":null + } + ], + "inputFields":null, + "interfaces":[ + + ], + "enumValues":null, + "possibleTypes":null + }, + { + "kind":"ENUM", + "name":"__TypeKind", + "description":"An enum describing what kind of type a given `__Type` is.", + "fields":null, + "inputFields":null, + "interfaces":null, + "enumValues":[ + { + "name":"SCALAR", + "description":"Indicates this type is a scalar.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"OBJECT", + "description":"Indicates this type is an object. `fields` and `interfaces` are valid fields.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"INTERFACE", + "description":"Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"UNION", + "description":"Indicates this type is a union. `possibleTypes` is a valid field.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"ENUM", + "description":"Indicates this type is an enum. `enumValues` is a valid field.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"INPUT_OBJECT", + "description":"Indicates this type is an input object. `inputFields` is a valid field.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"LIST", + "description":"Indicates this type is a list. `ofType` is a valid field.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"NON_NULL", + "description":"Indicates this type is a non-null. `ofType` is a valid field.", + "isDeprecated":false, + "deprecationReason":null + } + ], + "possibleTypes":null + }, + { + "kind":"OBJECT", + "name":"__Field", + "description":"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", + "fields":[ + { + "name":"name", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"description", + "description":null, + "args":[ + + ], + "type":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"args", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"LIST", + "name":null, + "ofType":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"OBJECT", + "name":"__InputValue", + "ofType":null + } + } + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"type", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"OBJECT", + "name":"__Type", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"isDeprecated", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"Boolean", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"deprecationReason", + "description":null, + "args":[ + + ], + "type":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + }, + "isDeprecated":false, + "deprecationReason":null + } + ], + "inputFields":null, + "interfaces":[ + + ], + "enumValues":null, + "possibleTypes":null + }, + { + "kind":"OBJECT", + "name":"__InputValue", + "description":"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", + "fields":[ + { + "name":"name", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"description", + "description":null, + "args":[ + + ], + "type":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"type", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"OBJECT", + "name":"__Type", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"defaultValue", + "description":"A GraphQL-formatted string representing the default value for this input value.", + "args":[ + + ], + "type":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + }, + "isDeprecated":false, + "deprecationReason":null + } + ], + "inputFields":null, + "interfaces":[ + + ], + "enumValues":null, + "possibleTypes":null + }, + { + "kind":"OBJECT", + "name":"__EnumValue", + "description":"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", + "fields":[ + { + "name":"name", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"description", + "description":null, + "args":[ + + ], + "type":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"isDeprecated", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"Boolean", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"deprecationReason", + "description":null, + "args":[ + + ], + "type":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + }, + "isDeprecated":false, + "deprecationReason":null + } + ], + "inputFields":null, + "interfaces":[ + + ], + "enumValues":null, + "possibleTypes":null + }, + { + "kind":"OBJECT", + "name":"__Directive", + "description":"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", + "fields":[ + { + "name":"name", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"description", + "description":null, + "args":[ + + ], + "type":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"locations", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"LIST", + "name":null, + "ofType":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"ENUM", + "name":"__DirectiveLocation", + "ofType":null + } + } + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"args", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"LIST", + "name":null, + "ofType":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"OBJECT", + "name":"__InputValue", + "ofType":null + } + } + } + }, + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"onOperation", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"Boolean", + "ofType":null + } + }, + "isDeprecated":true, + "deprecationReason":"Use `locations`." + }, + { + "name":"onFragment", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"Boolean", + "ofType":null + } + }, + "isDeprecated":true, + "deprecationReason":"Use `locations`." + }, + { + "name":"onField", + "description":null, + "args":[ + + ], + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"Boolean", + "ofType":null + } + }, + "isDeprecated":true, + "deprecationReason":"Use `locations`." + } + ], + "inputFields":null, + "interfaces":[ + + ], + "enumValues":null, + "possibleTypes":null + }, + { + "kind":"ENUM", + "name":"__DirectiveLocation", + "description":"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", + "fields":null, + "inputFields":null, + "interfaces":null, + "enumValues":[ + { + "name":"QUERY", + "description":"Location adjacent to a query operation.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"MUTATION", + "description":"Location adjacent to a mutation operation.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"SUBSCRIPTION", + "description":"Location adjacent to a subscription operation.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"FIELD", + "description":"Location adjacent to a field.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"FRAGMENT_DEFINITION", + "description":"Location adjacent to a fragment definition.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"FRAGMENT_SPREAD", + "description":"Location adjacent to a fragment spread.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"INLINE_FRAGMENT", + "description":"Location adjacent to an inline fragment.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"SCHEMA", + "description":"Location adjacent to a schema definition.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"SCALAR", + "description":"Location adjacent to a scalar definition.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"OBJECT", + "description":"Location adjacent to an object type definition.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"FIELD_DEFINITION", + "description":"Location adjacent to a field definition.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"ARGUMENT_DEFINITION", + "description":"Location adjacent to an argument definition.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"INTERFACE", + "description":"Location adjacent to an interface definition.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"UNION", + "description":"Location adjacent to a union definition.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"ENUM", + "description":"Location adjacent to an enum definition.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"ENUM_VALUE", + "description":"Location adjacent to an enum value definition.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"INPUT_OBJECT", + "description":"Location adjacent to an input object type definition.", + "isDeprecated":false, + "deprecationReason":null + }, + { + "name":"INPUT_FIELD_DEFINITION", + "description":"Location adjacent to an input object field definition.", + "isDeprecated":false, + "deprecationReason":null + } + ], + "possibleTypes":null + } + ], + "directives":[ + { + "name":"include", + "description":"Directs the executor to include this field or fragment only when the `if` argument is true.", + "locations":[ + "FIELD", + "FRAGMENT_SPREAD", + "INLINE_FRAGMENT" + ], + "args":[ + { + "name":"if", + "description":"Included when true.", + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"Boolean", + "ofType":null + } + }, + "defaultValue":null + } + ] + }, + { + "name":"skip", + "description":"Directs the executor to skip this field or fragment when the `if` argument is true.", + "locations":[ + "FIELD", + "FRAGMENT_SPREAD", + "INLINE_FRAGMENT" + ], + "args":[ + { + "name":"if", + "description":"Skipped when true.", + "type":{ + "kind":"NON_NULL", + "name":null, + "ofType":{ + "kind":"SCALAR", + "name":"Boolean", + "ofType":null + } + }, + "defaultValue":null + } + ] + }, + { + "name":"deprecated", + "description":"Marks an element of a GraphQL schema as no longer supported.", + "locations":[ + "FIELD_DEFINITION", + "ENUM_VALUE" + ], + "args":[ + { + "name":"reason", + "description":"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https:\/\/daringfireball.net\/projects\/markdown\/).", + "type":{ + "kind":"SCALAR", + "name":"String", + "ofType":null + }, + "defaultValue":"\"No longer supported\"" + } + ] + } + ] + } + } + } \ No newline at end of file diff --git a/fe/package.json b/fe/package.json index 8b25da8..27e44b0 100644 --- a/fe/package.json +++ b/fe/package.json @@ -21,6 +21,7 @@ "bs-fetch": "^0.3.1", "react": "^16.8.1", "react-dom": "^16.8.1", + "reason-apollo": "^0.15.2", "reason-react": "^0.5.3", "reason-react-document-title": "^1.0.1" }, @@ -29,6 +30,7 @@ "bs-platform": "^4.0.18", "css-loader": "^2.1.0", "file-loader": "^3.0.1", + "graphql_ppx": "^0.2.8", "node-sass": "^4.11.0", "sass-loader": "^7.1.0", "style-loader": "^0.23.1", diff --git a/fe/src/components/RankAndStats/RankAndStats.re b/fe/src/components/RankAndStats/RankAndStats.re index 1e04d70..495526a 100644 --- a/fe/src/components/RankAndStats/RankAndStats.re +++ b/fe/src/components/RankAndStats/RankAndStats.re @@ -21,13 +21,46 @@ let onError = (send: containerActions => unit, err) => { Js.Console.error(err); }; +module GetUsers = [%graphql + {| + query { + users @bsRecord { + userNid + code, + name, + rating, + team, + trendRatingDiff, + } + } +|} +]; + +let userNameQuery = GetUsers.make(); + +module GetUsersQuery = ReasonApolloQuery.Make(GetUsers); + +[@bs.module] external gql: ReasonApolloTypes.gql = "graphql-tag"; +let queryObj: ApolloClient.queryObj = { + "query": gql(. userNameQuery##query), + "variables": userNameQuery##variables, +}; + let getUsersSvc = () => ReasonReact.UpdateWithSideEffects( LOADING, ({send}) => - svcGet("users") - |> then_(json => onSuccess(send, json) |> resolve) - |> catch(err => onError(send, err) |> resolve) + Client.instance##query(queryObj) + |> then_(resp => + ( + switch (resp->GetUsersQuery.convertJsInputToReason.result) { + | Data(da) => + let users = da##users |> Array.to_list; + send(SetUsersToState(users)); + } + ) + |> resolve + ) |> ignore, ); @@ -64,4 +97,28 @@ let make = _children => { } } , -}; \ No newline at end of file +}; + +/* { + switch (state) { + | FAILURE => + | LOADING => renderContent(send, [], true) + | LOADED(users) => renderContent(send, users, false) + } + } */ + +/* + + ...{ + ({result}) => + switch (result) { + | Loading =>
{ReasonReact.string("Loading")}
+ | Error(error) => +
{ReasonReact.string(error##message)}
+ | Data(response) => + Js.log(response); + ReasonReact.string("resp"); + } + } +
+
*/ \ No newline at end of file diff --git a/fe/src/utils/GraphQL/Client.re b/fe/src/utils/GraphQL/Client.re new file mode 100644 index 0000000..56f6391 --- /dev/null +++ b/fe/src/utils/GraphQL/Client.re @@ -0,0 +1,6 @@ +let inMemoryCache = ApolloInMemoryCache.createInMemoryCache(); + +let httpLink = ApolloLinks.createHttpLink(~uri="/api/graphql", ()); + +let instance = + ReasonApollo.createApolloClient(~link=httpLink, ~cache=inMemoryCache, ()); \ No newline at end of file diff --git a/fe/yarn.lock b/fe/yarn.lock index 1f63534..6c334e3 100644 --- a/fe/yarn.lock +++ b/fe/yarn.lock @@ -33,6 +33,16 @@ resolved "https://registry.yarnpkg.com/@glennsl/bs-json/-/bs-json-3.0.0.tgz#b4e1cf6612270a8dd7287a8a71ebe17e8f0fb683" integrity sha512-slqtGLd/c3yQK9Qfd1gfMB9JCzNU4wzCpVPfO9pXlG64M+te5r30FK++tb3uQEVlVLYtpgZ4wCHtkI8xoshgxQ== +"@types/async@2.0.50": + version "2.0.50" + resolved "https://registry.yarnpkg.com/@types/async/-/async-2.0.50.tgz#117540e026d64e1846093abbd5adc7e27fda7bcb" + integrity sha512-VMhZMMQgV1zsR+lX/0IBfAk+8Eb7dPVMWiQGFAt3qjo5x7Ml6b77jUo0e1C3ToD+XRDXqtrfw+6AB0uUsPEr3Q== + +"@types/zen-observable@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.0.tgz#8b63ab7f1aa5321248aad5ac890a485656dcea4d" + integrity sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg== + "@webassemblyjs/ast@1.7.11": version "1.7.11" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.7.11.tgz#b988582cafbb2b095e8b556526f30c90d057cace" @@ -256,6 +266,134 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" +apollo-cache-inmemory@1.3.11: + version "1.3.11" + resolved "https://registry.yarnpkg.com/apollo-cache-inmemory/-/apollo-cache-inmemory-1.3.11.tgz#6cb8f24ec812715169f9acbb0b67833f9a19ec90" + integrity sha512-fSoyjBV5RV57J3i/VHDDB74ZgXc0PFiogheNFHEhC0mL6rg5e/DjTx0Vg+csIBk23gvlzTvV+eypx7Q2NJ+dYg== + dependencies: + apollo-cache "^1.1.21" + apollo-utilities "^1.0.26" + optimism "^0.6.6" + +apollo-cache@1.1.21: + version "1.1.21" + resolved "https://registry.yarnpkg.com/apollo-cache/-/apollo-cache-1.1.21.tgz#950025e2272741ba8e5064419906e3ac4072925d" + integrity sha512-5ErNb78KHtrJNimkDBTEigcvHkIqUmS7QJIk4lpZZ+XLVVgvk2fD+GhD1PLP+s8vHfAKVbO6vdbRxCCjGGrh5w== + dependencies: + apollo-utilities "^1.0.26" + +apollo-cache@^1.1.21: + version "1.2.1" + resolved "https://registry.yarnpkg.com/apollo-cache/-/apollo-cache-1.2.1.tgz#aae71eb4a11f1f7322adc343f84b1a39b0693644" + integrity sha512-nzFmep/oKlbzUuDyz6fS6aYhRmfpcHWqNkkA9Bbxwk18RD6LXC4eZkuE0gXRX0IibVBHNjYVK+Szi0Yied4SpQ== + dependencies: + apollo-utilities "^1.2.1" + tslib "^1.9.3" + +apollo-client@2.4.7: + version "2.4.7" + resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-2.4.7.tgz#b6712fd4c9ba346e3c44cfec7e6868e532b6a957" + integrity sha512-6aAm+16AFBYZhJF8eKxrup6AbYni01InDiwTfZhMMTP2xaXQWjsQnfaHbI2oE+hd3+AZFy1drkse8RZKghR/WQ== + dependencies: + "@types/zen-observable" "^0.8.0" + apollo-cache "1.1.21" + apollo-link "^1.0.0" + apollo-link-dedup "^1.0.0" + apollo-utilities "1.0.26" + symbol-observable "^1.0.2" + zen-observable "^0.8.0" + optionalDependencies: + "@types/async" "2.0.50" + +apollo-link-context@1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/apollo-link-context/-/apollo-link-context-1.0.10.tgz#c20b0b32c6e4e08c0d3967174f9c2a897c8431fe" + integrity sha512-HX3BEmkANs2A8AcYCy92SFJrW+0SbGrhDTSHV6ZwKIJ9ZrsOtly8cMrRLzEw1emjHIz5SP7XJEn3ko7BwhBBSw== + dependencies: + apollo-link "^1.2.4" + +apollo-link-dedup@^1.0.0: + version "1.0.18" + resolved "https://registry.yarnpkg.com/apollo-link-dedup/-/apollo-link-dedup-1.0.18.tgz#635cb5659b082e7f270f7649c4b0f71021f7bb4b" + integrity sha512-1rr54wyMTuqUmbWvcXbwduIcaCDcuIgU6MqQ599nAMuTrbSOXthGfoAD8BDTxBGQ9roVlM7ABP0VZVEWRoHWSg== + dependencies: + apollo-link "^1.2.11" + tslib "^1.9.3" + +apollo-link-error@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/apollo-link-error/-/apollo-link-error-1.1.2.tgz#d068fdf99892e6fc65cfe0390db8528d182f9481" + integrity sha512-zlEZiqQ42E49+BeX3mIKPkMTSlOPrYNEwzSi1MubUiP/Bi6QRP7tzdJXNBnUpkW6MjZJQpfSNZNxK/xwvPiJIw== + dependencies: + apollo-link "^1.2.4" + +apollo-link-http-common@^0.2.5, apollo-link-http-common@^0.2.6: + version "0.2.13" + resolved "https://registry.yarnpkg.com/apollo-link-http-common/-/apollo-link-http-common-0.2.13.tgz#c688f6baaffdc7b269b2db7ae89dae7c58b5b350" + integrity sha512-Uyg1ECQpTTA691Fwx5e6Rc/6CPSu4TB4pQRTGIpwZ4l5JDOQ+812Wvi/e3IInmzOZpwx5YrrOfXrtN8BrsDXoA== + dependencies: + apollo-link "^1.2.11" + ts-invariant "^0.3.2" + tslib "^1.9.3" + +apollo-link-http@1.5.7: + version "1.5.7" + resolved "https://registry.yarnpkg.com/apollo-link-http/-/apollo-link-http-1.5.7.tgz#098615c427a910ec8c5817476bbabe68c586b339" + integrity sha512-EZ9nynHjwYCpGYP5IsRrZGTWidUVpshk7MuSG4joqGtJMwpFCgMQz+y3BHdUhowHtfAd9z60XmeOTG9FJolb8A== + dependencies: + apollo-link "^1.2.4" + apollo-link-http-common "^0.2.6" + +apollo-link-ws@1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/apollo-link-ws/-/apollo-link-ws-1.0.8.tgz#ac1de8f29e92418728479a9a523af9f75b9ccc8b" + integrity sha512-ucuGvr8CBBwCHl/Rbtyuv9Fn0FN5Qoyvy84KHtuMl2Uux2Sq+jt3bUum+pZ+hZntEd9k8M1OjrrXqRJ4PtEpyA== + dependencies: + apollo-link "^1.2.2" + +apollo-link@1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.4.tgz#ab4d21d2e428db848e88b5e8f4adc717b19c954b" + integrity sha512-B1z+9H2nTyWEhMXRFSnoZ1vSuAYP+V/EdUJvRx9uZ8yuIBZMm6reyVtr1n0BWlKeSFyPieKJy2RLzmITAAQAMQ== + dependencies: + apollo-utilities "^1.0.0" + zen-observable-ts "^0.8.11" + +apollo-link@^1.0.0, apollo-link@^1.2.11, apollo-link@^1.2.2, apollo-link@^1.2.3, apollo-link@^1.2.4: + version "1.2.11" + resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.11.tgz#493293b747ad3237114ccd22e9f559e5e24a194d" + integrity sha512-PQvRCg13VduLy3X/0L79M6uOpTh5iHdxnxYuo8yL7sJlWybKRJwsv4IcRBJpMFbChOOaHY7Og9wgPo6DLKDKDA== + dependencies: + apollo-utilities "^1.2.1" + ts-invariant "^0.3.2" + tslib "^1.9.3" + zen-observable-ts "^0.8.18" + +apollo-upload-client@9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/apollo-upload-client/-/apollo-upload-client-9.1.0.tgz#13191714ae07388088f2c773ebbfd53ba2f64c53" + integrity sha512-ZN5gsbBjImEZTWWTUHpCEGDasnoBGbaODpznQ5EawyNHceuFYSNJbbft+ZZ841vZAcj9XZdKUKoaLBlMZ/r7nw== + dependencies: + apollo-link "^1.2.3" + apollo-link-http-common "^0.2.5" + extract-files "^4.0.0" + +apollo-utilities@1.0.26: + version "1.0.26" + resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.0.26.tgz#589c66bf4d16223531351cf667a230c787def1da" + integrity sha512-URw7o3phymliqYCYatcird2YRPUU2eWCNvip64U9gQrX56mEfK4m99yBIDCMTpmcvOFsKLii1sIEZsHIs/bvnw== + dependencies: + fast-json-stable-stringify "^2.0.0" + +apollo-utilities@^1.0.0, apollo-utilities@^1.0.26, apollo-utilities@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.2.1.tgz#1c3a1ebf5607d7c8efe7636daaf58e7463b41b3c" + integrity sha512-Zv8Udp9XTSFiN8oyXOjf6PMHepD4yxxReLsl6dPUy5Ths7jti3nmlBzZUOxuTWRwZn0MoclqL7RQ5UEJN8MAxg== + dependencies: + fast-json-stable-stringify "^2.0.0" + ts-invariant "^0.2.1" + tslib "^1.9.3" + aproba@^1.0.3, aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" @@ -294,6 +432,11 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= +asap@~2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= + asn1.js@^4.0.0: version "4.10.1" resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" @@ -337,6 +480,11 @@ async-foreach@^0.1.3: resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" integrity sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI= +async-limiter@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" + integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -357,6 +505,11 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== +backo2@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" + integrity sha1-MasayLEpNjRj41s+u2n038+6eUc= + balanced-match@^0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" @@ -599,6 +752,11 @@ camelcase@^3.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= + camelcase@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" @@ -807,6 +965,11 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= +core-js@^2.4.1: + version "2.6.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895" + integrity sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A== + core-js@~2.5.1: version "2.5.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" @@ -856,6 +1019,15 @@ cross-spawn@^3.0.0: lru-cache "^4.0.1" which "^1.2.9" +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -1135,6 +1307,13 @@ emojis-list@^2.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= +encoding@^0.1.11: + version "0.1.12" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= + dependencies: + iconv-lite "~0.4.13" + end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.1" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" @@ -1190,6 +1369,11 @@ estraverse@^4.1.0, estraverse@^4.1.1: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= +eventemitter3@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-2.0.3.tgz#b5e1079b59fb5e1ba2771c0a993be060a58c99ba" + integrity sha1-teEHm1n7XhuidxwKmTvgYKWMmbo= + events@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88" @@ -1203,6 +1387,19 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + execa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" @@ -1270,6 +1467,11 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" +extract-files@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-4.1.0.tgz#2d5b64af688dfd030274ca542c43fabba325019a" + integrity sha512-2gjdb3dVzr1ie9+K8pupPTnsNkK4qmzbTFOIxghiWoh6nCTajGCGC72ZNYX0nBWy5IOq1FXfRVgvkkLqqE4sdw== + extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -1295,6 +1497,25 @@ fastparse@^1.1.1: resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" integrity sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ== +fbjs-css-vars@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz#216551136ae02fe255932c3ec8775f18e2c078b8" + integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ== + +fbjs@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-1.0.0.tgz#52c215e0883a3c86af2a7a776ed51525ae8e0a5a" + integrity sha512-MUgcMEJaFhCaF1QtWGnmq9ZDRAzECTCRAF7O6UZIlAlkTs1SasiX9aP0Iw7wfD2mJ7wDTNfg2w7u5fSCwJk1OA== + dependencies: + core-js "^2.4.1" + fbjs-css-vars "^1.0.0" + isomorphic-fetch "^2.1.1" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.18" + figgy-pudding@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" @@ -1335,6 +1556,13 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" @@ -1477,6 +1705,11 @@ get-stdin@^4.0.1: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + get-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -1550,6 +1783,26 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== +graphql-tag@2.10.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.10.0.tgz#87da024be863e357551b2b8700e496ee2d4353ae" + integrity sha512-9FD6cw976TLLf9WYIUPCaaTpniawIjHWZSwIRZSjrfufJamcXbVVYfN2TWvJYbw0Xf2JjYbl1/f2+wDnBVw3/w== + +graphql@14.0.2: + version "14.0.2" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.0.2.tgz#7dded337a4c3fd2d075692323384034b357f5650" + integrity sha512-gUC4YYsaiSJT1h40krG3J+USGlwhzNTXSb4IOZljn9ag5Tj+RkoXrWp+Kh7WyE3t1NCfab5kzCuxBIvOMERMXw== + dependencies: + iterall "^1.2.2" + +graphql_ppx@^0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/graphql_ppx/-/graphql_ppx-0.2.8.tgz#2f057a69b3131b95cf4cd9ce1e53eb722e6d8baa" + integrity sha512-3MyMo5Kt1sKKc6JRQgrgz0FF23roFPiffaIVKMfJ/n3qxZ38L2qUrF2oUkyrgPfRAtDJUxAcshR6+q9LJAiZKA== + dependencies: + request "^2.82.0" + yargs "^11.0.0" + har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" @@ -1636,6 +1889,13 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" +hoist-non-react-statics@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz#b09178f0122184fb95acf525daaecb4d8f45958b" + integrity sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA== + dependencies: + react-is "^16.7.0" + homedir-polyfill@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" @@ -1662,7 +1922,7 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -iconv-lite@^0.4.4: +iconv-lite@^0.4.4, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -1698,6 +1958,11 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" +immutable-tuple@^0.4.9: + version "0.4.10" + resolved "https://registry.yarnpkg.com/immutable-tuple/-/immutable-tuple-0.4.10.tgz#e0b1625384f514084a7a84b749a3bb26e9179929" + integrity sha512-45jheDbc3Kr5Cw8EtDD+4woGRUV0utIrJBZT8XH0TPZRfm8tzT0/sLGGzyyCCFqFMG5Pv5Igf3WY/arn6+8V9Q== + import-local@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" @@ -1756,6 +2021,13 @@ interpret@^1.1.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== +invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" @@ -1893,7 +2165,7 @@ is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-stream@^1.1.0: +is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= @@ -1935,11 +2207,24 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= +isomorphic-fetch@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk= + dependencies: + node-fetch "^1.0.1" + whatwg-fetch ">=0.10.0" + isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= +iterall@^1.1.1, iterall@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.2.2.tgz#92d70deb8028e0c39ff3164fdbf4d8b088130cd7" + integrity sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA== + js-base64@^2.1.8: version "2.5.1" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121" @@ -2060,6 +2345,14 @@ loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2 emojis-list "^2.0.0" json5 "^1.0.1" +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -2083,6 +2376,16 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= +lodash.flowright@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/lodash.flowright/-/lodash.flowright-3.5.0.tgz#2b5fff399716d7e7dc5724fe9349f67065184d67" + integrity sha1-K1//OZcW1+fcVyT+k0n2cGUYTWc= + +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= + lodash.isfunction@^3.0.9: version "3.0.9" resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz#06de25df4db327ac931981d1bdb067e5af68d051" @@ -2093,6 +2396,11 @@ lodash.isobject@^3.0.2: resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d" integrity sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0= +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= + lodash.mergewith@^4.6.0: version "4.6.1" resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" @@ -2118,7 +2426,7 @@ lodash@^4.0.0, lodash@^4.17.11, lodash@~4.17.10, lodash@~4.17.4, lodash@~4.17.5: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== -loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4.0: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -2193,6 +2501,13 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= + dependencies: + mimic-fn "^1.0.0" + mem@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/mem/-/mem-4.1.0.tgz#aeb9be2d21f47e78af29e4ac5978e8afa2ca5b8a" @@ -2409,6 +2724,14 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +node-fetch@^1.0.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + node-gyp@^3.8.0: version "3.8.0" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.8.0.tgz#540304261c330e80d0d5edce253a68cb3964218c" @@ -2609,6 +2932,13 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" +optimism@^0.6.6: + version "0.6.9" + resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.6.9.tgz#19258ff8b3be0cea29ac35f06bff818e026e30bb" + integrity sha512-xoQm2lvXbCA9Kd7SCx6y713Y7sZ6fUc5R6VYpoL5M6svKJbTuvtNopexK8sO8K4s0EOUYHuPN2+yAEsNyRggkQ== + dependencies: + immutable-tuple "^0.4.9" + os-browserify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" @@ -2626,6 +2956,15 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + os-locale@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" @@ -2663,6 +3002,13 @@ p-is-promise@^2.0.0: resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.0.0.tgz#7554e3d572109a87e1f3f53f6a7d85d1b194f4c5" integrity sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg== +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + p-limit@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.1.0.tgz#1d5a0d20fb12707c758a655f6bbc4386b5930d68" @@ -2670,6 +3016,13 @@ p-limit@^2.0.0: dependencies: p-try "^2.0.0" +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -2677,6 +3030,11 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + p-try@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" @@ -2887,6 +3245,13 @@ promise-inflight@^1.0.1: resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= +promise@^7.1.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== + dependencies: + asap "~2.0.3" + prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" @@ -3018,6 +3383,18 @@ rc@^1.2.7: minimist "^1.2.0" strip-json-comments "~2.0.1" +react-apollo@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/react-apollo/-/react-apollo-2.3.2.tgz#b8e287d2813722b9e0a886cabf8149ab3b84a3b7" + integrity sha512-3lU9iqmj4KMIZvlWWSuLihxMGLEAL6oNmnSTWrb3/mRP36Zy0zJD4rdaonDx4WzqFYQAnUPaOiFnHGp0UQUTwA== + dependencies: + fbjs "^1.0.0" + hoist-non-react-statics "^3.0.0" + invariant "^2.2.2" + lodash.flowright "^3.5.0" + lodash.isequal "^4.5.0" + prop-types "^15.6.0" + "react-dom@>=15.0.0 || >=16.0.0", react-dom@^16.8.1: version "16.8.1" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.1.tgz#ec860f98853d09d39bafd3a6f1e12389d283dbb4" @@ -3028,6 +3405,11 @@ rc@^1.2.7: prop-types "^15.6.2" scheduler "^0.13.1" +react-is@^16.7.0: + version "16.8.5" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.5.tgz#c54ac229dd66b5afe0de5acbe47647c3da692ff8" + integrity sha512-sudt2uq5P/2TznPV4Wtdi+Lnq3yaYW8LfvPKLM9BKD8jJNBkxMVyB0C9/GmVhLw7Jbdmndk/73n7XQGeN9A3QQ== + react-is@^16.8.1: version "16.8.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.1.tgz#a80141e246eb894824fb4f2901c0c50ef31d4cdb" @@ -3138,6 +3520,25 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" +reason-apollo@^0.15.2: + version "0.15.2" + resolved "https://registry.yarnpkg.com/reason-apollo/-/reason-apollo-0.15.2.tgz#0452196fc07915907cc0d629679aa56a8c16933c" + integrity sha512-L0S6u2yHrBOgnZGz4WY2svjCXgbqM9+h8uirPEAj9mWLMuUGszmiR0aO/77ZNpfTrQL9JZ3Dxu6zyVUWdM5xuQ== + dependencies: + apollo-cache-inmemory "1.3.11" + apollo-client "2.4.7" + apollo-link "1.2.4" + apollo-link-context "1.0.10" + apollo-link-error "1.1.2" + apollo-link-http "1.5.7" + apollo-link-ws "1.0.8" + apollo-upload-client "9.1.0" + apollo-utilities "1.0.26" + graphql "14.0.2" + graphql-tag "2.10.0" + react-apollo "2.3.2" + subscriptions-transport-ws "0.9.0" + reason-react-document-title@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/reason-react-document-title/-/reason-react-document-title-1.0.1.tgz#f7ee622a9da3fb36b9a209a8b31d1d3a9de7e78b" @@ -3260,7 +3661,7 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request@^2.87.0, request@^2.88.0: +request@^2.82.0, request@^2.87.0, request@^2.88.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== @@ -3469,7 +3870,7 @@ set-value@^2.0.0: is-plain-object "^2.0.3" split-string "^3.0.1" -setimmediate@^1.0.4: +setimmediate@^1.0.4, setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= @@ -3763,6 +4164,20 @@ style-loader@^0.23.1: loader-utils "^1.1.0" schema-utils "^1.0.0" +subscriptions-transport-ws@0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.0.tgz#3dedd96a8fd01e63bdaf855c2ca0dcc68a87102e" + integrity sha512-4TP6IcZ1/z8AgT4B3Tji8SiLUHD8xzC1yCdzkJWshMYt0UbtYybJtasy/X6GYq9KavmAA60vZRRjfqjqD1tauw== + dependencies: + backo2 "^1.0.2" + eventemitter3 "^2.0.3" + iterall "^1.1.1" + lodash.assign "^4.2.0" + lodash.isobject "^3.0.2" + lodash.isstring "^4.0.1" + symbol-observable "^1.0.4" + ws "^3.0.0" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -3782,6 +4197,11 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" +symbol-observable@^1.0.2, symbol-observable@^1.0.4: + version "1.2.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" + integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== + tapable@^1.0.0, tapable@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.1.tgz#4d297923c5a72a42360de2ab52dadfaaec00018e" @@ -3897,7 +4317,21 @@ trim-newlines@^1.0.0: dependencies: glob "^7.1.2" -tslib@^1.9.0: +ts-invariant@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.2.1.tgz#3d587f9d6e3bded97bf9ec17951dd9814d5a9d3f" + integrity sha512-Z/JSxzVmhTo50I+LKagEISFJW3pvPCqsMWLamCTX8Kr3N5aMrnGOqcflbe5hLUzwjvgPfnLzQtHZv0yWQ+FIHg== + dependencies: + tslib "^1.9.3" + +ts-invariant@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.3.2.tgz#89a2ffeb70879b777258df1df1c59383c35209b0" + integrity sha512-QsY8BCaRnHiB5T6iE4DPlJMAKEG3gzMiUco9FEt1jUXQf0XP6zi0idT0i0rMTu8A326JqNSDsmlkA9dRSh1TRg== + dependencies: + tslib "^1.9.3" + +tslib@^1.9.0, tslib@^1.9.3: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== @@ -3924,6 +4358,16 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= +ua-parser-js@^0.7.18: + version "0.7.19" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.19.tgz#94151be4c0a7fb1d001af7022fdaca4642659e4b" + integrity sha512-T3PVJ6uz8i0HzPxOF9SWzWAlfN/DavlpQqepn22xgve/5QecC+XMCAtmUNnY7C9StehaV6exjUCI801lOI7QlQ== + +ultron@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" + integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== + union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" @@ -4103,6 +4547,11 @@ webpack@^4.29.3: watchpack "^1.5.0" webpack-sources "^1.3.0" +whatwg-fetch@>=0.10.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" + integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== + which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" @@ -4147,6 +4596,15 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= +ws@^3.0.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" + integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== + dependencies: + async-limiter "~1.0.0" + safe-buffer "~5.1.0" + ultron "~1.1.0" + xtend@^4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -4187,6 +4645,31 @@ yargs-parser@^5.0.0: dependencies: camelcase "^3.0.0" +yargs-parser@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" + integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= + dependencies: + camelcase "^4.1.0" + +yargs@^11.0.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" + integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== + dependencies: + cliui "^4.0.0" + decamelize "^1.1.1" + find-up "^2.1.0" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^9.0.2" + yargs@^12.0.4: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" @@ -4223,3 +4706,16 @@ yargs@^7.0.0: which-module "^1.0.0" y18n "^3.2.1" yargs-parser "^5.0.0" + +zen-observable-ts@^0.8.11, zen-observable-ts@^0.8.18: + version "0.8.18" + resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.18.tgz#ade44b1060cc4a800627856ec10b9c67f5f639c8" + integrity sha512-q7d05s75Rn1j39U5Oapg3HI2wzriVwERVo4N7uFGpIYuHB9ff02P/E92P9B8T7QVC93jCMHpbXH7X0eVR5LA7A== + dependencies: + tslib "^1.9.3" + zen-observable "^0.8.0" + +zen-observable@^0.8.0: + version "0.8.13" + resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.13.tgz#a9f1b9dbdfd2d60a08761ceac6a861427d44ae2e" + integrity sha512-fa+6aDUVvavYsefZw0zaZ/v3ckEtMgCFi30sn91SEZea4y/6jQp05E3omjkX91zV6RVdn15fqnFZ6RKjRGbp2g== From 3b9081ee5c7daf1a426984103737cd0038842e30 Mon Sep 17 00:00:00 2001 From: Qziem Date: Sun, 24 Mar 2019 23:06:54 +0100 Subject: [PATCH 05/10] =?UTF-8?q?Wydzielenie=20cz=C4=99=C5=9Bci=20wsp?= =?UTF-8?q?=C3=B3lnej=20tworzenia=20klienta=20bez=20komponentu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/RankAndStats/RankAndStats.re | 63 ++++--------------- fe/src/utils/GraphQL/ClientNoComponent.re | 19 ++++++ 2 files changed, 31 insertions(+), 51 deletions(-) create mode 100644 fe/src/utils/GraphQL/ClientNoComponent.re diff --git a/fe/src/components/RankAndStats/RankAndStats.re b/fe/src/components/RankAndStats/RankAndStats.re index 495526a..d6a12cb 100644 --- a/fe/src/components/RankAndStats/RankAndStats.re +++ b/fe/src/components/RankAndStats/RankAndStats.re @@ -1,7 +1,6 @@ open EloTypes; open Js.Promise; -open Svc; [%bs.raw {|require('./RankAndStats.scss')|}]; type state = @@ -13,14 +12,6 @@ let component = ReasonReact.reducerComponent("RankAndStats"); let initialState = () => LOADING; -let onSuccess = (send, json) => - json |> DecodeUsers.users |> (users => send(SetUsersToState(users))); - -let onError = (send: containerActions => unit, err) => { - send(SetFailure); - Js.Console.error(err); -}; - module GetUsers = [%graphql {| query { @@ -38,29 +29,23 @@ module GetUsers = [%graphql let userNameQuery = GetUsers.make(); -module GetUsersQuery = ReasonApolloQuery.Make(GetUsers); +module ClientGetUsers = ClientNoComponent.Make(GetUsers); -[@bs.module] external gql: ReasonApolloTypes.gql = "graphql-tag"; -let queryObj: ApolloClient.queryObj = { - "query": gql(. userNameQuery##query), - "variables": userNameQuery##variables, -}; +let onSuccess = (send, result: ReasonApolloTypes.queryResponse(GetUsers.t)) => + switch (result) { + | Data(response) => + let users = response##users |> Array.to_list; + send(SetUsersToState(users)); + | Loading => () + | Error(_) => send(SetFailure) + }; let getUsersSvc = () => ReasonReact.UpdateWithSideEffects( LOADING, ({send}) => - Client.instance##query(queryObj) - |> then_(resp => - ( - switch (resp->GetUsersQuery.convertJsInputToReason.result) { - | Data(da) => - let users = da##users |> Array.to_list; - send(SetUsersToState(users)); - } - ) - |> resolve - ) + ClientGetUsers.call(userNameQuery) + |> then_(result => result |> onSuccess(send) |> resolve) |> ignore, ); @@ -97,28 +82,4 @@ let make = _children => { } } , -}; - -/* { - switch (state) { - | FAILURE => - | LOADING => renderContent(send, [], true) - | LOADED(users) => renderContent(send, users, false) - } - } */ - -/* - - ...{ - ({result}) => - switch (result) { - | Loading =>
{ReasonReact.string("Loading")}
- | Error(error) => -
{ReasonReact.string(error##message)}
- | Data(response) => - Js.log(response); - ReasonReact.string("resp"); - } - } -
-
*/ \ No newline at end of file +}; \ No newline at end of file diff --git a/fe/src/utils/GraphQL/ClientNoComponent.re b/fe/src/utils/GraphQL/ClientNoComponent.re new file mode 100644 index 0000000..9ab8e5c --- /dev/null +++ b/fe/src/utils/GraphQL/ClientNoComponent.re @@ -0,0 +1,19 @@ +open Js.Promise; + +module Make = (Config: ReasonApolloTypes.Config) => { + [@bs.module] external gql: ReasonApolloTypes.gql = "graphql-tag"; + module Query = ReasonApolloQuery.Make(Config); + + let call = queryMade => { + let queryObj: ApolloClient.queryObj = { + "query": gql(. queryMade##query), + "variables": queryMade##variables, + }; + + Client.instance##query(queryObj) + |> then_(resp => { + let converted = resp->Query.convertJsInputToReason; + resolve(converted.result); + }); + }; +}; \ No newline at end of file From 71644ea96f096e570a8f297e6a7a26ec32e65683 Mon Sep 17 00:00:00 2001 From: Qziem Date: Thu, 28 Mar 2019 17:47:31 +0100 Subject: [PATCH 06/10] Update yarn.lock --- fe/yarn.lock | 314 ++++++++++++++++++++++++--------------------------- 1 file changed, 149 insertions(+), 165 deletions(-) diff --git a/fe/yarn.lock b/fe/yarn.lock index fe94622..1c84f3e 100644 --- a/fe/yarn.lock +++ b/fe/yarn.lock @@ -17,11 +17,11 @@ recharts "^1.0.0-beta.10" "@babel/runtime@^7.1.2": - version "7.3.1" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.1.tgz#574b03e8e8a9898eaf4a872a92ea20b7846f6f2a" - integrity sha512-7jGW8ppV0ant637pIqAcFfQDDH1orEPGJb8aXfUozuCU3QqX7rX4DA8iwrbPrR1hcH0FTTHz47yQnk+bl5xHQA== + version "7.4.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.2.tgz#f5ab6897320f16decd855eed70b705908a313fe8" + integrity sha512-7Bl2rALb7HpvXFL7TETNzKSAeBVCPHELzc0C//9FCxN8nsiueWSJBqaF+2oIJScyILStASR/Cx5WMkXGYTiJFA== dependencies: - regenerator-runtime "^0.12.0" + regenerator-runtime "^0.13.2" "@fortawesome/fontawesome-free@^5.8.1": version "5.8.1" @@ -33,16 +33,20 @@ resolved "https://registry.yarnpkg.com/@glennsl/bs-json/-/bs-json-3.0.0.tgz#b4e1cf6612270a8dd7287a8a71ebe17e8f0fb683" integrity sha512-slqtGLd/c3yQK9Qfd1gfMB9JCzNU4wzCpVPfO9pXlG64M+te5r30FK++tb3uQEVlVLYtpgZ4wCHtkI8xoshgxQ== -"@webassemblyjs/ast@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359" - integrity sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ== +"@types/async@2.0.50": + version "2.0.50" + resolved "https://registry.yarnpkg.com/@types/async/-/async-2.0.50.tgz#117540e026d64e1846093abbd5adc7e27fda7bcb" + integrity sha512-VMhZMMQgV1zsR+lX/0IBfAk+8Eb7dPVMWiQGFAt3qjo5x7Ml6b77jUo0e1C3ToD+XRDXqtrfw+6AB0uUsPEr3Q== "@types/zen-observable@^0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.0.tgz#8b63ab7f1aa5321248aad5ac890a485656dcea4d" integrity sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg== +"@webassemblyjs/ast@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359" + integrity sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ== dependencies: "@webassemblyjs/helper-module-context" "1.8.5" "@webassemblyjs/helper-wasm-bytecode" "1.8.5" @@ -206,9 +210,9 @@ acorn-dynamic-import@^4.0.0: integrity sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw== acorn@^6.0.5: - version "6.1.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.0.tgz#b0a3be31752c97a0f7013c5f4903b71a05db6818" - integrity sha512-MW/FjM+IvU9CgBzjO3UIPCE2pyEwUsoFl+VGdczOPEdxfGFjuKny/gN54mOuX7Qxmb9Rg9MCn2oKiSUeW+pjrw== + version "6.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f" + integrity sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA== ajv-errors@^1.0.0: version "1.0.1" @@ -221,9 +225,9 @@ ajv-keywords@^3.1.0: integrity sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw== ajv@^6.1.0, ajv@^6.5.5: - version "6.9.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.9.1.tgz#a4d3683d74abc5670e75f0b16520f70a20ea8dc1" - integrity sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA== + version "6.10.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" + integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== dependencies: fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" @@ -470,9 +474,9 @@ assign-symbols@^1.0.0: integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= async-each@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - integrity sha1-GdOGodntxufByF04iu28xW0zYC0= + version "1.0.2" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.2.tgz#8b8a7ca2a658f927e9f307d6d1a42f4199f0f735" + integrity sha512-6xrbvN0MOBKSJDdonmSSz2OwFSgxRaVtBDes26mj9KIGtDo+g9xosFRSC+i1gQh2oAN/tQ62AI/pGZGQjVOiRg== async-foreach@^0.1.3: version "0.1.3" @@ -550,9 +554,9 @@ big.js@^5.2.2: integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== binary-extensions@^1.0.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.0.tgz#9523e001306a32444b907423f1de2164222f6ab1" - integrity sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw== + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== block-stream@*: version "0.0.9" @@ -756,12 +760,7 @@ camelcase@^4.1.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= -camelcase@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" - integrity sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA== - -camelcase@^5.2.0: +camelcase@^5.0.0, camelcase@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.2.0.tgz#e7522abda5ed94cc0489e1b8466610e88404cf45" integrity sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ== @@ -792,9 +791,9 @@ chalk@^2.4.1, chalk@^2.4.2: supports-color "^5.3.0" chokidar@^2.0.2: - version "2.1.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.1.tgz#adc39ad55a2adf26548bd2afa048f611091f9184" - integrity sha512-gfw3p2oQV2wEt+8VuMlNsPjCxDxvvgnm/kz+uATu805mWVF8IJN7uz9DN7iBz+RMJISmiVbCOBFs9qBGMjtPfQ== + version "2.1.5" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.5.tgz#0ae8434d962281a5f56c72869e79cb6d9d86ad4d" + integrity sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A== dependencies: anymatch "^2.0.0" async-each "^1.0.1" @@ -806,7 +805,7 @@ chokidar@^2.0.2: normalize-path "^3.0.0" path-is-absolute "^1.0.0" readdirp "^2.2.1" - upath "^1.1.0" + upath "^1.1.1" optionalDependencies: fsevents "^1.2.7" @@ -905,10 +904,10 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@~2.17.1: - version "2.17.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" - integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== +commander@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== commondir@^1.0.1: version "1.0.1" @@ -1346,9 +1345,9 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= eslint-scope@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" - integrity sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA== + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== dependencies: esrecurse "^4.1.0" estraverse "^4.1.1" @@ -1531,12 +1530,12 @@ fill-range@^4.0.0: to-regex-range "^2.1.0" find-cache-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.0.0.tgz#4c1faed59f45184530fb9d7fa123a4d04a98472d" - integrity sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA== + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== dependencies: commondir "^1.0.1" - make-dir "^1.0.0" + make-dir "^2.0.0" pkg-dir "^3.0.0" find-up@^1.0.0: @@ -1888,9 +1887,9 @@ hoist-non-react-statics@^3.0.0: react-is "^16.7.0" homedir-polyfill@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" - integrity sha1-TCu8inWJmP7r9e1oWA921GdotLw= + version "1.0.3" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" + integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== dependencies: parse-passwd "^1.0.0" @@ -1933,9 +1932,9 @@ icss-utils@^4.1.0: postcss "^7.0.14" ieee754@^1.1.4: - version "1.1.12" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" - integrity sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA== + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== iferr@^0.1.5: version "0.1.5" @@ -2141,9 +2140,9 @@ is-glob@^3.1.0: is-extglob "^2.1.0" is-glob@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" - integrity sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A= + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== dependencies: is-extglob "^2.1.1" @@ -2447,12 +2446,13 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -make-dir@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" - integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== +make-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== dependencies: - pify "^3.0.0" + pify "^4.0.1" + semver "^5.6.0" mamacro@^0.0.3: version "0.0.3" @@ -2505,12 +2505,12 @@ mem@^1.1.0: mimic-fn "^1.0.0" mem@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-4.1.0.tgz#aeb9be2d21f47e78af29e4ac5978e8afa2ca5b8a" - integrity sha512-I5u6Q1x7wxO0kdOpYBB28xueHADYps5uty/zg936CiG8NTe5sJL8EjrCuLneuDW3PlMdZBGDIn8BirEVdovZvg== + version "4.2.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.2.0.tgz#5ee057680ed9cb8dad8a78d820f9a8897a102025" + integrity sha512-5fJxa68urlY0Ir8ijatKa3eRz5lwXnRCTvo9+TbTGAuTFJOwpGcY0X05moBd0nW45965Njt4CDI2GFQoG8DvqA== dependencies: map-age-cleaner "^0.1.1" - mimic-fn "^1.0.0" + mimic-fn "^2.0.0" p-is-promise "^2.0.0" memory-fs@^0.4.0, memory-fs@~0.4.1: @@ -2564,23 +2564,28 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@~1.37.0: - version "1.37.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" - integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg== +mime-db@~1.38.0: + version "1.38.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.38.0.tgz#1a2aab16da9eb167b49c6e4df2d9c68d63d8e2ad" + integrity sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg== mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.21" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96" - integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg== + version "2.1.22" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.22.tgz#fe6b355a190926ab7698c9a0556a11199b2199bd" + integrity sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog== dependencies: - mime-db "~1.37.0" + mime-db "~1.38.0" mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== +mimic-fn@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.0.0.tgz#0913ff0b121db44ef5848242c38bbb35d44cabde" + integrity sha512-jbex9Yd/3lmICXwYT6gA/j2mNQGU48wCh/VzRd+/Y/PjYQtlg1gLMdZqvu9s/xH7qKvngxRObl56XZR609IMbA== + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -2680,9 +2685,9 @@ ms@2.0.0: integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= nan@^2.10.0, nan@^2.9.2: - version "2.12.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.12.1.tgz#7b1aa193e9aa86057e3c7bbd0ac448e770925552" - integrity sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw== + version "2.13.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7" + integrity sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw== nanomatch@^1.2.9: version "1.2.13" @@ -2859,9 +2864,9 @@ npm-bundled@^1.0.1: integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== npm-packlist@^1.1.6: - version "1.3.0" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.3.0.tgz#7f01e8e44408341379ca98cfd756e7b29bd2626c" - integrity sha512-qPBc6CnxEzpOcc4bjoIBJbYdy0D/LFFPUdxvfwor4/w3vxeE0h6TiOVurCEPpQ6trjN77u/ShyfeJGsbAfB3dA== + version "1.4.1" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.1.tgz#19064cdf988da80ea3cee45533879d90192bbfbc" + integrity sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw== dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" @@ -3006,9 +3011,9 @@ p-limit@^1.1.0: p-try "^1.0.0" p-limit@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.1.0.tgz#1d5a0d20fb12707c758a655f6bbc4386b5930d68" - integrity sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g== + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2" + integrity sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ== dependencies: p-try "^2.0.0" @@ -3032,14 +3037,14 @@ p-try@^1.0.0: integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= p-try@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" - integrity sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ== + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.1.0.tgz#c1a0f1030e97de018bb2c718929d2af59463e505" + integrity sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA== pako@~1.0.5: - version "1.0.8" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.8.tgz#6844890aab9c635af868ad5fecc62e8acbba3ea4" - integrity sha512-6i0HVbUfcKaTv+EG8ZTr75az7GFXcLYk9UyLEg7Notv/Ma+z/UG3TCoz6GiNeOrn1E/e63I0X/Hpw18jHOTUnA== + version "1.0.10" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732" + integrity sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw== parallel-transform@^1.1.0: version "1.1.0" @@ -3051,9 +3056,9 @@ parallel-transform@^1.1.0: readable-stream "^2.1.5" parse-asn1@^5.0.0: - version "5.1.3" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.3.tgz#1600c6cc0727365d68b97f3aa78939e735a75204" - integrity sha512-VrPoetlz7B/FqjBLD2f5wBVZvsZVLnRUrxVLfRYhGXCODa/NWE4p3Wp+6+aV3ZPL3KM7/OZmxDIwwijD7yuucg== + version "5.1.4" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.4.tgz#37f6628f823fbdeb2273b4d540434a22f3ef1fcc" + integrity sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw== dependencies: asn1.js "^4.0.0" browserify-aes "^1.0.0" @@ -3151,6 +3156,11 @@ pify@^3.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -3364,9 +3374,9 @@ raf@^3.4.0: performance-now "^2.1.0" randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" - integrity sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A== + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" @@ -3393,7 +3403,7 @@ rc@^1.2.7: minimist "^1.2.0" strip-json-comments "~2.0.1" -"react-dom@>=15.0.0 || >=16.0.0": +react-apollo@2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/react-apollo/-/react-apollo-2.3.2.tgz#b8e287d2813722b9e0a886cabf8149ab3b84a3b7" integrity sha512-3lU9iqmj4KMIZvlWWSuLihxMGLEAL6oNmnSTWrb3/mRP36Zy0zJD4rdaonDx4WzqFYQAnUPaOiFnHGp0UQUTwA== @@ -3405,29 +3415,20 @@ rc@^1.2.7: lodash.isequal "^4.5.0" prop-types "^15.6.0" - version "16.8.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.1.tgz#ec860f98853d09d39bafd3a6f1e12389d283dbb4" - integrity sha512-N74IZUrPt6UiDjXaO7UbDDFXeUXnVhZzeRLy/6iqqN1ipfjrhR60Bp5NuBK+rv3GMdqdIuwIl22u1SYwf330bg== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.13.1" - -react-dom@^16.8.5: - version "16.8.5" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.5.tgz#b3e37d152b49e07faaa8de41fdf562be3463335e" - integrity sha512-VIEIvZLpFafsfu4kgmftP5L8j7P1f0YThfVTrANMhZUFMDOsA6e0kfR6wxw/8xxKs4NB59TZYbxNdPCDW34x4w== +"react-dom@>=15.0.0 || >=16.0.0", react-dom@^16.8.5: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f" + integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.13.5" + scheduler "^0.13.6" -react-is@^16.8.1: - version "16.8.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.1.tgz#a80141e246eb894824fb4f2901c0c50ef31d4cdb" - integrity sha512-ioMCzVDWvCvKD8eeT+iukyWrBGrA3DiFYkXfBsVYIRdaREZuBjENG+KjrikavCLasozqRWTwFUagU/O4vPpRMA== +react-is@^16.7.0, react-is@^16.8.1: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" + integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== react-lifecycles-compat@^3.0.4: version "3.0.4" @@ -3463,34 +3464,24 @@ react-smooth@~1.0.0: react-transition-group "^2.5.0" react-transition-group@^2.2.1, react-transition-group@^2.5.0: - version "2.5.3" - resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.5.3.tgz#26de363cab19e5c88ae5dbae105c706cf953bb92" - integrity sha512-2DGFck6h99kLNr8pOFk+z4Soq3iISydwOFeeEVPjTN6+Y01CmvbWmnN02VuTWyFdnRtIDPe+wy2q6Ui8snBPZg== + version "2.7.1" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.7.1.tgz#1fe6d54e811e8f9dfd329aa836b39d9cd16587cb" + integrity sha512-b0VJTzNRnXxRpCuxng6QJbAzmmrhBn1BZJfPPnHbH2PIo8msdkajqwtfdyGm/OypPXZNfAHKEqeN15wjMXrRJQ== dependencies: dom-helpers "^3.3.1" loose-envify "^1.4.0" prop-types "^15.6.2" react-lifecycles-compat "^3.0.4" -"react@>=15.0.0 || >=16.0.0": - version "16.8.1" - resolved "https://registry.yarnpkg.com/react/-/react-16.8.1.tgz#ae11831f6cb2a05d58603a976afc8a558e852c4a" - integrity sha512-wLw5CFGPdo7p/AgteFz7GblI2JPOos0+biSoxf1FPsGxWQZdN/pj6oToJs1crn61DL3Ln7mN86uZ4j74p31ELQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.13.1" - -react@^16.8.5: - version "16.8.5" - resolved "https://registry.yarnpkg.com/react/-/react-16.8.5.tgz#49be3b655489d74504ad994016407e8a0445de66" - integrity sha512-daCb9TD6FZGvJ3sg8da1tRAtIuw29PbKZW++NN4wqkbEvxL+bZpaaYb4xuftW/SpXmgacf1skXl/ddX6CdOlDw== +"react@>=15.0.0 || >=16.0.0", react@^16.8.5: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe" + integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.13.5" + scheduler "^0.13.6" reactstrap@^5.0.0: version "5.0.0" @@ -3584,9 +3575,9 @@ recharts-scale@^0.4.2: decimal.js-light "^2.4.1" recharts@^1.0.0-beta.10: - version "1.4.3" - resolved "https://registry.yarnpkg.com/recharts/-/recharts-1.4.3.tgz#e70ef21678f472e298e636741d31fd869ef8a4f5" - integrity sha512-pkwQtCUFePnuBN7GfUR6gXrgfiV89cKoHhcszIsNOPgDFA9XEljp5J8QZGqGRVuaeK+oECPSUkpJtU83ZQYytA== + version "1.5.0" + resolved "https://registry.yarnpkg.com/recharts/-/recharts-1.5.0.tgz#ecb4f015cec5b1284294954b7906c7c2ec6e25be" + integrity sha512-bsKJRvh4NepPJlXoI4L9oRKhrv59W7fjs6qTqk6le9MFAywe8EYiW/t07RDQHBVIj6icb+UdSFsHxEo8c5AcTg== dependencies: classnames "~2.2.5" core-js "~2.5.1" @@ -3624,10 +3615,10 @@ reduce-function-call@^1.0.1: dependencies: balanced-match "^0.4.2" -regenerator-runtime@^0.12.0: - version "0.12.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" - integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg== +regenerator-runtime@^0.13.2: + version "0.13.2" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447" + integrity sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA== regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" @@ -3803,18 +3794,10 @@ sax@^1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -scheduler@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.1.tgz#1a217df1bfaabaf4f1b92a9127d5d732d85a9591" - integrity sha512-VJKOkiKIN2/6NOoexuypwSrybx13MY7NSy9RNt8wPvZDMRT1CW6qlpF5jXRToXNHz3uWzbm2elNpZfXfGPqP9A== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - -scheduler@^0.13.5: - version "0.13.5" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.5.tgz#b7226625167041298af3b98088a9dbbf6d7733a8" - integrity sha512-K98vjkQX9OIt/riLhp6F+XtDPtMQhqNcf045vsh+pcuvHq+PHy1xCrH3pq1P40m6yR46lpVvVhKdEOtnimuUJw== +scheduler@^0.13.6: + version "0.13.6" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889" + integrity sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -3836,10 +3819,10 @@ scss-tokenizer@^0.2.3: js-base64 "^2.1.8" source-map "^0.4.2" -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" - integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" + integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== semver@~5.3.0: version "5.3.0" @@ -3961,10 +3944,10 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@~0.5.9: - version "0.5.10" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.10.tgz#2214080bc9d51832511ee2bab96e3c2f9353120c" - integrity sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ== +source-map-support@~0.5.10: + version "0.5.11" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.11.tgz#efac2ce0800355d026326a0ca23e162aeac9a4e2" + integrity sha512-//sajEx/fGL3iw6fltKMdPvy8kL3kJ2O3iuYlRoT3k9Kb4BjOoZ+BZzaNHeuaruSt+Kf3Zk9tnfAQg9/AJqUVQ== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -4236,9 +4219,9 @@ tar@^4: yallist "^3.0.2" terser-webpack-plugin@^1.1.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.2.2.tgz#9bff3a891ad614855a7dde0d707f7db5a927e3d9" - integrity sha512-1DMkTk286BzmfylAvLXwpJrI7dWa5BnFmscV/2dCr8+c56egFcbaeFAl7+sujAjdmpLam21XRdhA4oifLyiWWg== + version "1.2.3" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.2.3.tgz#3f98bc902fac3e5d0de730869f50668561262ec8" + integrity sha512-GOK7q85oAb/5kE12fMuLdn2btOS9OBZn4VsecpHDywoUC/jLhSAKOiYo0ezx7ss2EXPMzyEWFoE0s1WLE+4+oA== dependencies: cacache "^11.0.2" find-cache-dir "^2.0.0" @@ -4250,13 +4233,13 @@ terser-webpack-plugin@^1.1.0: worker-farm "^1.5.2" terser@^3.16.1: - version "3.16.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-3.16.1.tgz#5b0dd4fa1ffd0b0b43c2493b2c364fd179160493" - integrity sha512-JDJjgleBROeek2iBcSNzOHLKsB/MdDf+E/BOAJ0Tk9r7p9/fVobfv7LMJ/g/k3v9SXdmjZnIlFd5nfn/Rt0Xow== + version "3.17.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-3.17.0.tgz#f88ffbeda0deb5637f9d24b0da66f4e15ab10cb2" + integrity sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ== dependencies: - commander "~2.17.1" + commander "^2.19.0" source-map "~0.6.1" - source-map-support "~0.5.9" + source-map-support "~0.5.10" through2@^2.0.0: version "2.0.5" @@ -4411,10 +4394,10 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" -upath@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" - integrity sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw== +upath@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" + integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== uri-js@^4.2.2: version "4.2.2" @@ -4656,7 +4639,7 @@ yargs-parser@^5.0.0: dependencies: camelcase "^3.0.0" -yargs@^12.0.5: +yargs-parser@^9.0.2: version "9.0.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= @@ -4681,6 +4664,7 @@ yargs@^11.0.0: y18n "^3.2.1" yargs-parser "^9.0.2" +yargs@^12.0.5: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== From 9adc01a3699f14b96fb31f84f9e5415da8b62af9 Mon Sep 17 00:00:00 2001 From: Qziem Date: Mon, 8 Apr 2019 19:38:57 +0200 Subject: [PATCH 07/10] Przerobienie na komponent Query --- fe/src/Index.re | 7 +- fe/src/components/GameResult/GameResult.re | 16 ++--- .../components/RankAndStats/RankAndStats.re | 67 +++++++++---------- 3 files changed, 46 insertions(+), 44 deletions(-) diff --git a/fe/src/Index.re b/fe/src/Index.re index ebc044b..f8d692f 100644 --- a/fe/src/Index.re +++ b/fe/src/Index.re @@ -1,2 +1,7 @@ [%bs.raw {|require('./Index.scss')|}]; -ReactDOMRe.renderToElementWithId(, "mountPoint"); +ReactDOMRe.renderToElementWithId( + + + , + "mountPoint", +); \ No newline at end of file diff --git a/fe/src/components/GameResult/GameResult.re b/fe/src/components/GameResult/GameResult.re index 7cbf540..a3b2fa8 100644 --- a/fe/src/components/GameResult/GameResult.re +++ b/fe/src/components/GameResult/GameResult.re @@ -51,13 +51,13 @@ module GameResponseContentDecoder = { module GameResponseDecoder = ResponseDecoder.MakeWithWarningsOrContent(GameResponseContentDecoder); -let onSuccess = (containterSend, send, json) => { +let onSuccess = (refreshUsers, send, json) => { let updateRatingsResult = GameResponseDecoder.decode(json); switch (updateRatingsResult) { | SUCCESS(ratingDiff) => send(SetSaveSuccess(ratingDiff)); - containterSend(GetUsersSvc); + refreshUsers(); | WARNING(msg) => send(SetWarning(msg)) }; }; @@ -67,7 +67,7 @@ let onError = (send, err) => { Js.Console.error(err); }; -let updateRatingsSvc = (state, containterSend) => { +let updateRatingsSvc = (state, refreshUsers) => { let winnerLooserCodes = { winnerUserCode: String.trim(state.userWinnerCode), looserUserCode: String.trim(state.userLooserCode), @@ -78,7 +78,7 @@ let updateRatingsSvc = (state, containterSend) => { ({send}) => { let payload = EncodeUpdateRatings.encode(winnerLooserCodes); svcPut("users/update_ratings", payload) - |> then_(json => onSuccess(containterSend, send, json) |> resolve) + |> then_(json => onSuccess(refreshUsers, send, json) |> resolve) |> catch(err => onError(send, err) |> resolve) |> ignore; }, @@ -88,13 +88,13 @@ let updateRatingsSvc = (state, containterSend) => { let sendWarning = (msg: string) => ReasonReact.SideEffects(({send}) => send(SetWarning(msg))); -let reducer = (containterSend, action, state) => +let reducer = (refreshUsers, action, state) => switch (action) { | ChangeWinUser(value) => ReasonReact.Update({...state, userWinnerCode: value}) | ChangeLooseUser(value) => ReasonReact.Update({...state, userLooserCode: value}) - | UpdateClick => updateRatingsSvc(state, containterSend) + | UpdateClick => updateRatingsSvc(state, refreshUsers) | SetSaveSuccess(ratingDiff) => ReasonReact.Update({ userWinnerCode: "", @@ -111,10 +111,10 @@ let valueFromEvent = event => ReactEvent.Form.target(event)##value; let hanldeDismissAlert = (send, ()) => send(ClearSaveState); -let make = (~containterSend, ~disable, _children) => { +let make = (~refreshUsers, ~disable, _children) => { ...component, initialState, - reducer: reducer(containterSend), + reducer: reducer(refreshUsers), render: ({state, send}) =>
diff --git a/fe/src/components/RankAndStats/RankAndStats.re b/fe/src/components/RankAndStats/RankAndStats.re index d6a12cb..6ba4bbf 100644 --- a/fe/src/components/RankAndStats/RankAndStats.re +++ b/fe/src/components/RankAndStats/RankAndStats.re @@ -1,5 +1,4 @@ open EloTypes; -open Js.Promise; [%bs.raw {|require('./RankAndStats.scss')|}]; @@ -27,40 +26,22 @@ module GetUsers = [%graphql |} ]; -let userNameQuery = GetUsers.make(); - -module ClientGetUsers = ClientNoComponent.Make(GetUsers); - -let onSuccess = (send, result: ReasonApolloTypes.queryResponse(GetUsers.t)) => - switch (result) { - | Data(response) => - let users = response##users |> Array.to_list; - send(SetUsersToState(users)); - | Loading => () - | Error(_) => send(SetFailure) - }; - -let getUsersSvc = () => - ReasonReact.UpdateWithSideEffects( - LOADING, - ({send}) => - ClientGetUsers.call(userNameQuery) - |> then_(result => result |> onSuccess(send) |> resolve) - |> ignore, - ); +module GetUsersQuery = ReasonApollo.CreateQuery(GetUsers); let reducer = (action: containerActions, _state) => switch (action) { - | GetUsersSvc => getUsersSvc() + | GetUsersSvc => ReasonReact.NoUpdate | SetUsersToState(users) => ReasonReact.Update(LOADED(users)) | SetFailure => ReasonReact.Update(FAILURE) }; -let renderContent = (send, users, isUsersLoading) => +let refreshUsersWithRefetch = (refetch, ()) => refetch(None)->ignore; + +let renderContent = (users, isUsersLoading, refreshUsers) =>
- +

{ReasonReact.string("Statistics for player")}

@@ -71,15 +52,31 @@ let make = _children => { ...component, initialState, reducer, - didMount: ({send}) => send(GetUsersSvc), - render: ({state, send}) => + render: _self => { + let usersQuery = GetUsers.make(); +
- { - switch (state) { - | FAILURE => - | LOADING => renderContent(send, [], true) - | LOADED(users) => renderContent(send, users, false) - } - } -
, + + ...{ + ({result, refetch, networkStatus}) => { + let refreshUsers = refreshUsersWithRefetch(refetch); + let isRefeching = networkStatus == Some(4); + + switch (result, isRefeching) { + | (Loading, _) + | (_, true) => renderContent([], true, refreshUsers) + | (Error(_error), _) => + | (Data(response), _) => + renderContent( + response##users->Array.to_list, + false, + refreshUsers, + ) + }; + } + } + +
; + }, }; \ No newline at end of file From e7c56994e1cb8ba8a392994eb3e03bb6fbd78618 Mon Sep 17 00:00:00 2001 From: Qziem Date: Mon, 8 Apr 2019 19:42:12 +0200 Subject: [PATCH 08/10] Przerobienie komponentu ta stateless --- fe/src/components/RankAndStats/RankAndStats.re | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/fe/src/components/RankAndStats/RankAndStats.re b/fe/src/components/RankAndStats/RankAndStats.re index 6ba4bbf..3236de4 100644 --- a/fe/src/components/RankAndStats/RankAndStats.re +++ b/fe/src/components/RankAndStats/RankAndStats.re @@ -2,14 +2,7 @@ open EloTypes; [%bs.raw {|require('./RankAndStats.scss')|}]; -type state = - | LOADING - | LOADED(list(user)) - | FAILURE; - -let component = ReasonReact.reducerComponent("RankAndStats"); - -let initialState = () => LOADING; +let component = ReasonReact.statelessComponent("RankAndStats"); module GetUsers = [%graphql {| @@ -28,13 +21,6 @@ module GetUsers = [%graphql module GetUsersQuery = ReasonApollo.CreateQuery(GetUsers); -let reducer = (action: containerActions, _state) => - switch (action) { - | GetUsersSvc => ReasonReact.NoUpdate - | SetUsersToState(users) => ReasonReact.Update(LOADED(users)) - | SetFailure => ReasonReact.Update(FAILURE) - }; - let refreshUsersWithRefetch = (refetch, ()) => refetch(None)->ignore; let renderContent = (users, isUsersLoading, refreshUsers) => @@ -50,8 +36,6 @@ let renderContent = (users, isUsersLoading, refreshUsers) => let make = _children => { ...component, - initialState, - reducer, render: _self => { let usersQuery = GetUsers.make(); From cf74e36c594d8bd4466711a9baf837fa05004b84 Mon Sep 17 00:00:00 2001 From: Qziem Date: Tue, 9 Apr 2019 18:34:03 +0200 Subject: [PATCH 09/10] Obliczanie trend w jego resolverze --- be/GraphQLElo/Resolvers/UsersResolver.php | 19 ++++++++++----- be/GraphQLElo/Types/UsersType.php | 28 ++++++++++++----------- be/Service/UsersSvc.php | 7 ++++++ 3 files changed, 35 insertions(+), 19 deletions(-) diff --git a/be/GraphQLElo/Resolvers/UsersResolver.php b/be/GraphQLElo/Resolvers/UsersResolver.php index 1143624..8d3a929 100644 --- a/be/GraphQLElo/Resolvers/UsersResolver.php +++ b/be/GraphQLElo/Resolvers/UsersResolver.php @@ -2,20 +2,27 @@ namespace GraphQLElo\Resolvers; -use Service\UsersSvc; +use Model\Entity\User; +use Model\Repository\UserRepository; class UsersResolver { - /** @var UsersSvc */ - private $usersSvc; + /** @var UserRepository */ + private $userRepository; - public function __construct(UsersSvc $usersSvc) + public function __construct(UserRepository $userRepository) { - $this->usersSvc = $usersSvc; + $this->userRepository = $userRepository; } + /** + * @return User[]; + */ public function __invoke(): array { - return $this->usersSvc->getUsers(); + return $this->userRepository->findBy( + ['deleted' => 0], + ['rating' => 'DESC', 'code' => 'ASC'] + ); } } \ No newline at end of file diff --git a/be/GraphQLElo/Types/UsersType.php b/be/GraphQLElo/Types/UsersType.php index fababb5..6e0b224 100644 --- a/be/GraphQLElo/Types/UsersType.php +++ b/be/GraphQLElo/Types/UsersType.php @@ -2,47 +2,49 @@ namespace GraphQLElo\Types; +use Model\Entity\User; +use Service\UsersSvc; use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Definition\Type; class UsersType extends ObjectType { - public function __construct() { + public function __construct(UsersSvc $usersSvc) { $config = [ 'fields' => [ 'userNid' => [ 'type' => Type::nonNull(Type::int()), - 'resolve' => function ($root) { - return $root['userNid']; + 'resolve' => function (User $user) { + return $user->getUserNid(); }, ], 'code' => [ 'type' => Type::nonNull(Type::string()), - 'resolve' => function ($root) { - return $root['code']; + 'resolve' => function (User $user) { + return $user->getCode(); }, ], 'name' => [ 'type' => Type::nonNull(Type::string()), - 'resolve' => function ($root) { - return $root['name']; + 'resolve' => function (User $user) { + return $user->getName(); }, ], 'rating' => [ 'type' => Type::nonNull(Type::int()), - 'resolve' => function ($root) { - return $root['rating']; + 'resolve' => function (User $user) { + return $user->getRating(); }, ], 'team' => [ 'type' => Type::nonNull(Type::string()), - 'resolve' => function ($root) { - return $root['team']; + 'resolve' => function (User $user) { + return $user->getTeam(); }, ], 'trendRatingDiff' => [ 'type' => Type::nonNull(Type::int()), - 'resolve' => function ($root) { - return $root['trendRatingDiff']; + 'resolve' => function (User $user) use ($usersSvc) { + return $usersSvc->calculateTrendRatingDiffForGql($user); }, ], ], diff --git a/be/Service/UsersSvc.php b/be/Service/UsersSvc.php index d11ad99..0aa789f 100644 --- a/be/Service/UsersSvc.php +++ b/be/Service/UsersSvc.php @@ -68,6 +68,13 @@ private function calculateTrendRatingDiff(array $userArray): array return $userArray; } + public function calculateTrendRatingDiffForGql(User $user): int { + $winGamesSumRating = $this->sumRatingDiffs($user->getLastWonGameList()); + $looseGamesSumRating = $this->sumRatingDiffs($user->getLastLostGameList()); + + return $winGamesSumRating - $looseGamesSumRating; + } + private function sumRatingDiffs(Collection $gameList): int { return array_reduce($gameList->toArray(), function (int $acc, Game $game) { From 8451f440fc5b6077320883e60650bdbd7bc4f8cb Mon Sep 17 00:00:00 2001 From: Qziem Date: Tue, 9 Apr 2019 18:37:11 +0200 Subject: [PATCH 10/10] Zmiana nazwy na UserType --- be/Controller/GraphQLCtrl.php | 12 ++++++------ be/GraphQLElo/Types/{UsersType.php => UserType.php} | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) rename be/GraphQLElo/Types/{UsersType.php => UserType.php} (97%) diff --git a/be/Controller/GraphQLCtrl.php b/be/Controller/GraphQLCtrl.php index 1b44cf0..8d619c5 100644 --- a/be/Controller/GraphQLCtrl.php +++ b/be/Controller/GraphQLCtrl.php @@ -9,18 +9,18 @@ use GraphQL\Type\Schema; use GraphQL\Type\Definition\Type; use GraphQLElo\Resolvers\UsersResolver; -use GraphQLElo\Types\UsersType; +use GraphQLElo\Types\UserType; class GraphQLCtrl { /** @var UsersResolver */ private $usersResolver; - /** @var UsersType */ - private $usersType; + /** @var UserType */ + private $userType; - public function __construct(UsersResolver $usersResolver, UsersType $usersType) { + public function __construct(UsersResolver $usersResolver, UserType $userType) { $this->usersResolver = $usersResolver; - $this->usersType = $usersType; + $this->userType = $userType; } public function api(Request $request, Response $response): Response { @@ -55,7 +55,7 @@ public function api(Request $request, Response $response): Response { private function getQueryFields() { return [ 'users' => [ - 'type' => Type::nonNull(Type::listOf(Type::nonNull($this->usersType))), + 'type' => Type::nonNull(Type::listOf(Type::nonNull($this->userType))), 'resolve' => $this->usersResolver, ], ]; diff --git a/be/GraphQLElo/Types/UsersType.php b/be/GraphQLElo/Types/UserType.php similarity index 97% rename from be/GraphQLElo/Types/UsersType.php rename to be/GraphQLElo/Types/UserType.php index 6e0b224..c292b5a 100644 --- a/be/GraphQLElo/Types/UsersType.php +++ b/be/GraphQLElo/Types/UserType.php @@ -7,7 +7,7 @@ use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Definition\Type; -class UsersType extends ObjectType { +class UserType extends ObjectType { public function __construct(UsersSvc $usersSvc) { $config = [ 'fields' => [