Skip to content

Commit

Permalink
Add Email.dataFolder
Browse files Browse the repository at this point in the history
  • Loading branch information
zarathustra323 committed Jul 26, 2021
1 parent 053f5ef commit 20c2678
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions services/graphql/src/graphql/definitions/email.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type Email implements ClientIdentifiable @applyInterfaceFields {
createdDate: Date @prop(name: "CreatedDate")
modifiedDate: Date @prop(name: "ModifiedDate")
dataFolder: DataFolder @prop(name: "CategoryID")
sends(input: EmailSendsInput = {}): SendConnection! @prop(name: "ID")
html: String @prop(name: "HTMLBody")
Expand Down
12 changes: 12 additions & 0 deletions services/graphql/src/graphql/resolvers/email.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ module.exports = {
*
*/
Email: {
/**
*
*/
dataFolder: ({ CategoryID }, _, { soap }, info) => {
if (!CategoryID) return null;
const props = typeProperties(info);
return soap.retrieveById('DataFolder', CategoryID, props);
},

/**
*
*/
sends: async ({ ID }, { input }, { soap }, info) => {
const { continueRequest } = input;
if (continueRequest) {
Expand Down

0 comments on commit 20c2678

Please sign in to comment.