From 8bfd9e886bd04b10e42b098aa29b3e43353c992c Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 21 Apr 2021 14:23:57 +0200 Subject: [PATCH] build: update typed-graphqlify to version 3.1.1 (#41738) Use latest version of typed-graphqlify PR Close #41738 --- dev-infra/build-worker.js | 2 +- dev-infra/ng-dev.js | 2 +- dev-infra/utils/git/github.ts | 2 +- package.json | 2 +- tools/contributing-stats/get-data.ts | 4 ++-- yarn.lock | 8 ++++---- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dev-infra/build-worker.js b/dev-infra/build-worker.js index 1595a4bc4c..cdb4c23b2f 100644 --- a/dev-infra/build-worker.js +++ b/dev-infra/build-worker.js @@ -106,7 +106,7 @@ var GithubClient = /** @class */ (function (_super) { throw new GithubGraphqlClientError('Cannot query via graphql without an authentication token set, use the authenticated ' + '`GitClient` by calling `GitClient.getAuthenticatedInstance()`.'); } - return [4 /*yield*/, this._graphql(typedGraphqlify.query(queryObject), params)]; + return [4 /*yield*/, this._graphql(typedGraphqlify.query(queryObject).toString(), params)]; case 1: return [2 /*return*/, (_a.sent())]; } }); diff --git a/dev-infra/ng-dev.js b/dev-infra/ng-dev.js index 4089067483..3c39c13097 100755 --- a/dev-infra/ng-dev.js +++ b/dev-infra/ng-dev.js @@ -269,7 +269,7 @@ var GithubClient = /** @class */ (function (_super) { throw new GithubGraphqlClientError('Cannot query via graphql without an authentication token set, use the authenticated ' + '`GitClient` by calling `GitClient.getAuthenticatedInstance()`.'); } - return [4 /*yield*/, this._graphql(typedGraphqlify.query(queryObject), params)]; + return [4 /*yield*/, this._graphql(typedGraphqlify.query(queryObject).toString(), params)]; case 1: return [2 /*return*/, (_a.sent())]; } }); diff --git a/dev-infra/utils/git/github.ts b/dev-infra/utils/git/github.ts index b6326d9245..2e24380058 100644 --- a/dev-infra/utils/git/github.ts +++ b/dev-infra/utils/git/github.ts @@ -75,7 +75,7 @@ export class GithubClient extends Octokit { 'Cannot query via graphql without an authentication token set, use the authenticated ' + '`GitClient` by calling `GitClient.getAuthenticatedInstance()`.'); } - return (await this._graphql(query(queryObject), params)) as T; + return (await this._graphql(query(queryObject).toString(), params)) as T; } /** Retrieve the login of the current user from Github. */ diff --git a/package.json b/package.json index 4b7928b304..85b28f2fe8 100644 --- a/package.json +++ b/package.json @@ -200,7 +200,7 @@ "ts-node": "^9.1.1", "tslint-eslint-rules": "5.4.0", "tslint-no-toplevel-property-access": "0.0.2", - "typed-graphqlify": "^2.3.0", + "typed-graphqlify": "^3.1.1", "vlq": "1.0.1", "vrsource-tslint-rules": "6.0.0" }, diff --git a/tools/contributing-stats/get-data.ts b/tools/contributing-stats/get-data.ts index 0b0373abb8..69d81c275e 100644 --- a/tools/contributing-stats/get-data.ts +++ b/tools/contributing-stats/get-data.ts @@ -112,7 +112,7 @@ async function getAllOrgMembers() { while (hasNextPage) { const {query, params} = queryBuilder(100, cursor); - const results = await graphql(query, params) as typeof MEMBERS_QUERY; + const results = await graphql(query.toString(), params) as typeof MEMBERS_QUERY; results.organization.membersWithRole.nodes.forEach( (node: {login: string}) => members.push(node.login)); @@ -237,7 +237,7 @@ async function run(date: string) { console.info(['Username', ...buildQueryAndParams('', date).labels].join(',')); for (const username of allOrgMembers) { - const results = await graphql(buildQueryAndParams(username, date).query); + const results = await graphql(buildQueryAndParams(username, date).query.toString()); const values = Object.values(results).map(result => `${result.issueCount}`); console.info([username, ...values].join(',')); } diff --git a/yarn.lock b/yarn.lock index a3677b2830..dfd2f8310f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13396,10 +13396,10 @@ type@^2.0.0: resolved "https://registry.yarnpkg.com/type/-/type-2.5.0.tgz#0a2e78c2e77907b252abe5f298c1b01c63f0db3d" integrity sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw== -typed-graphqlify@^2.3.0: - version "2.4.5" - resolved "https://registry.yarnpkg.com/typed-graphqlify/-/typed-graphqlify-2.4.5.tgz#e881f8a90911c32aec76a112e8e5077ead36e151" - integrity sha512-0iD2WkYmdxsTS2TGchnrY+vuSZHrTkj2i/Pa3UKTNPdrig5bV2f8UpGEfQ4Gq8pp3Vd9esqGIVgjC7hYR6OsOg== +typed-graphqlify@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/typed-graphqlify/-/typed-graphqlify-3.1.1.tgz#461d433922ff33ec10bb17dee7e332a0a0eafa27" + integrity sha512-Tr8DarPhPUdW7vsGc9Vi5INtAqjt+Xm5k3shZ8FH/j+odVMABC8+xnZrcgKq5AJeUBJt+2w+iH81AMQb9vvlqg== typedarray-to-buffer@^3.1.5: version "3.1.5"