i make small test like so
` import { Client, Databases, ID, RelationshipType } from "node-appwrite";
const client = new Client(); client .setEndpoint("https://cloud.appwrite.io/v1") .setProject("68.......") .setKey("standard_21ab........");
const databases = new Databases(client);
(async () => { const databaseId = "68...........";
const collection = await databases.createCollection(
databaseId,
ID.unique(),
"Test"
);
await databases.createStringAttribute(databaseId, collection.$id, "user_id", 36, true);
await databases.createRelationshipAttribute(databaseId, collection.$id, "user_id", "users", RelationshipType.OneToOne);
})(); `
The error message is
` throw new AppwriteException(data == null ? void 0 : data.message, response.status, data == null ? void 0 : data.type, responseText);
AppwriteException: Invalid type param: Value must be one of (oneToOne, manyToOne, manyToMany, oneToMany)
at _Client.call (file:///config/workspace/DCSLab/node_modules/node-appwrite/dist/client.mjs:293:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///config/workspace/DCSLab/test.js:23:5 {
code: 400,
type: 'general_argument_invalid',
response: '{"message":"Invalid type param: Value must be one of (oneToOne, manyToOne, manyToMany, oneToMany)","code":400,"type":"general_argument_invalid","version":"1.6.2"}'
}
`
i tried using string "oneToOne" also throwing same error
Recommended threads
- Helping in unblock my account
I deleted my Appwrite Cloud account that was linked via GitHub. Now I activated my GitHub Student Pack and want to sign up again using the same GitHub account, ...
- Not allowed permission to upsert a prese...
```js const presenceID = ID.unique(); setPID(presenceID); const presence = await presences.upsert({ presenceId: presenceID, status: "online"...
- Request for temporary 3 to 4 hours datab...
Hi Appwrite Team, I hope you are doing well.We are an early-stage startup currently running on Appwrite Cloud. We have unfortunately exhausted our database rea...