Skip to content

Commit

Permalink
Merge pull request #1 from korzhanov/dgraph-adapter-patch-for-id
Browse files Browse the repository at this point in the history
fix dgraph adapter createUser
  • Loading branch information
korzhanov committed Apr 24, 2024
2 parents 24ef3f4 + 5555d05 commit b82fce9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/adapter-dgraph/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export function DgraphAdapter(
const fragments = { ...defaultFragments, ...options?.fragments }
return {
async createUser(input) {
if (input?.id) { delete (input.id) } // Dgraph will generate the ID by itself
const result = await c.run<{ user: any[] }>(
/* GraphQL */ `
mutation ($input: [AddUserInput!]!) {
Expand Down

0 comments on commit b82fce9

Please sign in to comment.