@forge/cli
14.1.0-next.21-experimental-554d41714.1.0-next.19-experimental-fd0ebbc
out/providers/graphql-client.js~
out/providers/graphql-client.jsModified+4−3
Index: package/out/providers/graphql-client.js
===================================================================
--- package/out/providers/graphql-client.js
+++ package/out/providers/graphql-client.js
@@ -7,9 +7,9 @@
constructor(graphqlClient) {
this.graphqlClient = graphqlClient;
}
async configureProvider(details) {
- const mutation = `
+ const mutation = (0, cli_shared_1.graphql)(`
mutation forge_cli_setExternalAuthCredentials($input: SetExternalAuthCredentialsInput!) {
setExternalAuthCredentials(input: $input) {
success
errors {
@@ -20,10 +20,10 @@
}
}
}
}
- `;
- const { response: { setExternalAuthCredentials: { success, errors } }, requestId } = await this.graphqlClient.mutate(mutation, {
+ `);
+ const { response, requestId } = await this.graphqlClient.mutate(mutation, {
input: {
environment: {
appId: details.appId,
key: details.environment
@@ -33,8 +33,9 @@
clientSecret: details.clientSecret
}
}
});
+ const { success, errors } = (0, cli_shared_1.requireMutationPayload)(response.setExternalAuthCredentials, requestId);
const error = (0, cli_shared_1.getError)(errors);
if (!success) {
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, {
requestId,