Skip to content

Commit

Permalink
Merge pull request #6 from amplication/fix/5-ra-data-graphql-amp-to-m…
Browse files Browse the repository at this point in the history
…any-realaion-support

fix(ra-data-graphql-amp): toMany support
  • Loading branch information
yuval-hazaz authored Feb 20, 2022
2 parents 94785d4 + 8975ea3 commit bd8fd2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
dist
.idea
7 changes: 7 additions & 0 deletions src/buildVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,13 @@ const buildCreateUpdateVariables = (
...acc,
[`${key}Ids`]: params.data[key].map(({ id }: any) => id),
};
} else {
return {
...acc,
[key]: {
connect: params.data[key],
}
}
}
}

Expand Down

0 comments on commit bd8fd2d

Please sign in to comment.