© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
1 reply
Luci

Insert returning: partial return not working

After inserting, I'm attempting to return the generated uuid to ensure that it worked, but when I do the following, I'm getting and error saying:
Expected 0 arguments, but got 1.ts(2554)
Expected 0 arguments, but got 1.ts(2554)
. In the schema, the
id
id
field is a
uuid
uuid
and does have the
defaultRandom
defaultRandom
added to it.

Here's my insert;
const [{ id }] = await this.db
    .insert(authUser)
    .values({
        ...props,
        createdAt: new Date().getTime()
    })
    .onConflictDoNothing()
    .returning({ id: authUser.id });
const [{ id }] = await this.db
    .insert(authUser)
    .values({
        ...props,
        createdAt: new Date().getTime()
    })
    .onConflictDoNothing()
    .returning({ id: authUser.id });
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

insert returning relations
Drizzle TeamDTDrizzle Team / help
3y ago
Nested insert not working
Drizzle TeamDTDrizzle Team / help
2y ago
Return on insert.onConflictDoNothing()
Drizzle TeamDTDrizzle Team / help
2y ago