Skip to content

Commit

Permalink
feat: added scalar attachment
Browse files Browse the repository at this point in the history
  • Loading branch information
froid1911 committed Feb 9, 2024
1 parent 2950846 commit 61c55d6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions api/src/modules/system/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,16 @@ export const GQLDateBase = scalarType({
return null;
},
});


export const GQLAttachmentBase = scalarType({
name: 'Attachment',
asNexusMethod: 'attachment',
description: 'Attachment custom scalar type',
serialize(value: any) {
return JSON.stringify(value);
},
parseValue(value: unknown) {
return JSON.parse(value as string);
},
});

0 comments on commit 61c55d6

Please sign in to comment.