Skip to content

Commit

Permalink
Update apply-diff.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
gkielwasser committed May 26, 2023
1 parent 6141092 commit 9bdfd64
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion api/src/utils/apply-diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,15 @@ export async function applyDiff(

if (diff?.[0]?.kind === DiffKind.NEW) {
try {
await relationsService.createOne((diff[0] as DiffNew<Relation>).rhs, mutationOptions);
// await relationsService.createOne((diff[0] as DiffNew<Relation>).rhs, mutationOptions);
await relationsService.createOne(
{
...(diff[0] as DiffNew<Relation>).rhs,
collection,
field
},
mutationOptions
);
} catch (err) {
logger.error(`Failed to create relation "${collection}.${field}"`);
throw err;
Expand Down

0 comments on commit 9bdfd64

Please sign in to comment.