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
- fastly error
Hey! I'm hitting a Fastly error on the www version of our site, but the root domain works fine. We have a wildcard set up, so I expected the subdomain to be cov...
- Facebook's scraper facebookexternalhit g...
share.bardbliss.com but works fine on the raw fra.appwrite.run URL. No execution logs appear when Facebook hits the custom domain. This was working before. How ...
- How to Display File in Web?
I'm trying to use Appwrite's Storage to store images and display them in my app, however when I use the `getFileView`, `getFileDownload` or `getFilePreview` met...