From dbb0996b0fcd9784bb11fa44632f6d24d4fbe5cc Mon Sep 17 00:00:00 2001 From: YUVRAJ SINGH <74104618+Yuvraj3905@users.noreply.github.com> Date: Sat, 4 Oct 2025 14:30:07 +0530 Subject: [PATCH] fix: correct schema writing method from tenancy.create to schema.write - Replace incorrect tenancy.create() call with proper schema.write() method - Maintain same schema content and tenantId parameter - Add error handling for schema write operations --- README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d1f2b51..b47a23f 100644 --- a/README.md +++ b/README.md @@ -109,15 +109,18 @@ let schema = ` } `; -// Write the schema -client.tenancy - .create({ - tenantId: "t1", - schema: schema, - }) - .then((response) => { - // handle response - }); +// Write the schema using the correct method +client.schema.write({ + tenantId: "t1", + schema: schema, +}) +.then((response) => { + console.log("Schema written successfully:", response); + // handle response - typically contains schemaVersion +}) +.catch((error) => { + console.error("Error writing schema:", error); +}); ``` ### 4. Relationship Management