diff --git a/packages/adapter-dgraph/src/index.ts b/packages/adapter-dgraph/src/index.ts index 2b240e26f1..da2f7d3e20 100644 --- a/packages/adapter-dgraph/src/index.ts +++ b/packages/adapter-dgraph/src/index.ts @@ -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!]!) {