@forge/lint
6.2.3-next.16-experimental-554d4176.2.3-next.15-experimental-fd0ebbc
out/lint/linters/server-side-linter/graphql-client.js~
out/lint/linters/server-side-linter/graphql-client.jsModified+8−6
Index: package/out/lint/linters/server-side-linter/graphql-client.js
===================================================================
--- package/out/lint/linters/server-side-linter/graphql-client.js
+++ package/out/lint/linters/server-side-linter/graphql-client.js
@@ -25,9 +25,9 @@
constructor(graphqlClient) {
this.graphqlClient = graphqlClient;
}
async createAppManifestUploadUrl(appId, environmentKey) {
- const mutation = `
+ const mutation = (0, cli_shared_1.graphql)(`
mutation forge_cli_createAppManifestUploadUrl($input: CreateAppManifestUploadUrlInput!) {
createAppManifestUploadUrl(input: $input) {
success
preSignedUrl
@@ -38,15 +38,17 @@
statusCode
}
}
}
- }`;
- const { response: { createAppManifestUploadUrl: { success, preSignedUrl, errors } }, requestId } = await this.graphqlClient.mutate(mutation, {
+ }
+ `);
+ const { response, requestId } = await this.graphqlClient.mutate(mutation, {
input: {
appId,
environmentKey
}
});
+ const { success, preSignedUrl, errors } = (0, cli_shared_1.requireMutationPayload)(response.createAppManifestUploadUrl, requestId);
if (!success) {
const error = (0, cli_shared_1.getError)(errors);
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, {
requestId,
@@ -59,9 +61,9 @@
}
return preSignedUrl;
}
async getAppPreDeploymentCheck(appId, environmentKey, manifestUrl, bypassRules, buildTag, majorVersion) {
- const query = `
+ const query = (0, cli_shared_1.graphql)(`
query forge_cli_appPreDeploymentCheck($input: AppPreDeploymentCheckInput!) {
appPreDeploymentCheck(input: $input) {
outcome {
rule
@@ -81,15 +83,15 @@
}
}
}
}
- `;
+ `);
const result = await this.graphqlClient.query(query, {
input: {
appId,
environmentKey,
manifestUrl,
- bypassRules,
+ bypassRules: bypassRules,
buildTag,
majorVersion
}
});