Skip to content

AppwriteException: Missing required parameter: "data" #5027

Answered by stnguyen90
kirtanchandak asked this question in Q&A
Discussion options

You must be logged in to vote

@kirtanchandak, assuming you're using version 10.2.0 of the appwrite package, there are 4 required parameters, but you're only passing 3.

async createDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data: Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document>

Source: sdk-for-web

FYI, you can use ID.unique() for a unique ID.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@sandesh682
Comment options

@himankshu1
Comment options

Answer selected by stnguyen90
Comment options

You must be logged in to vote
1 reply
@stnguyen90
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
product / databases Fixes and upgrades for the Appwrite Database.
4 participants