@forge/cli-shared
9.7.0-next.15-experimental-554d4179.7.0-next.14-experimental-fd0ebbc
out/apps/create-app-graphql-client.js~
out/apps/create-app-graphql-client.jsModified+4−3
Index: package/out/apps/create-app-graphql-client.js
===================================================================
--- package/out/apps/create-app-graphql-client.js
+++ package/out/apps/create-app-graphql-client.js
@@ -11,9 +11,9 @@
constructor(graphqlClient) {
this.graphqlClient = graphqlClient;
}
async createApp(input) {
- const createAppQuery = `
+ const createAppQuery = (0, graphql_1.graphql)(`
mutation forge_cli_createApplication($input: CreateAppInput!) {
createApp(input: $input) {
success
errors {
@@ -30,12 +30,13 @@
}
}
}
}
- `;
- const { response: { createApp: { success, errors, app } }, requestId } = await this.graphqlClient.mutate(createAppQuery, {
+ `);
+ const { response, requestId } = await this.graphqlClient.mutate(createAppQuery, {
input
});
+ const { success, errors, app } = (0, graphql_1.requireMutationPayload)(response.createApp, requestId);
const error = (0, graphql_1.getError)(errors);
if (!success) {
throw new graphql_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, {
requestId,