Skip to content

Commit

Permalink
Improved output action file formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
oojacoboo committed Oct 13, 2023
1 parent a5e5cd1 commit c1fc027
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ const getQueryActionContent = async (action, query) => {
const contents =
`/**
* ${query} query
* This file was auto-generated by the zapier-graphql plugin.
* This file was auto-generated by zapier-graphql.
*/
'use strict';
Expand All @@ -804,9 +804,10 @@ const perform = async (z, bundle) => {
return ${typeDetails.isList ? `response.data.data.${query}` : `[response.data.data.${query}]`};
};
// For a full list of available properties, see:
// https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#searchschema
module.exports = {
// For a full list of available properties, see:
// https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#searchschema
key: '${definition.name}',
noun: '${typeDetails.type.name}',
Expand Down Expand Up @@ -866,7 +867,7 @@ const getMutationActionContent = async (mutation) => {
const contents =
`/**
* ${mutation} mutation
* This file was auto-generated by the zapier-graphql plugin.
* This file was auto-generated by zapier-graphql.
*/
'use strict';
Expand All @@ -890,9 +891,10 @@ const perform = async (z, bundle) => {
return response.data.data.${mutation};
};
// For a full list of available properties, see:
// https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#searchschema
module.exports = {
// For a full list of available properties, see:
// https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#searchschema
key: '${definition.name}',
noun: '${typeDetails.type.name}',
Expand Down

0 comments on commit c1fc027

Please sign in to comment.