This is my code
While this is my error
I looked into the appwrite SDK code as well The equal method is well defined, in it
yes, but you're not using it right
thanks but I did refer that quite some times I cannot use this line
import { Client, Databases, Query } from "appwrite";
gives me a bunch of error on server side
but importing like this works
const sdk = require("node-appwrite");
But this does not seem to work
const query = sdk.Query()
So was trying to do it that way
well appwrite
is the web sdk...given the docs, how do you think you'd do it with the node sdk?
I tried doing with
const sdk = require("node-appwrite");
const query = sdk.Query();
// Now while using
query.equal(attribute, value);
// this should have worked I guess```
well that didn't work and that doesn't look like the docs, right?
https://appwrite.io/docs/products/databases/databases
I was following this server sdk
I will try doing
import { Client, Databases, Query } from "node-appwrite";
no, your import is fine
I am sorry I am not able to catch the correction
I guess it is in function calling maybe
line
query.equal()
I mean
right, that's the incorrect part. does that look like what's in the docs?
sir please reply my message
Thanks a lot @Steven It clicked me
Instead of this now doing
const query = sdk.Query;
query.equal();
Now I can access the equal function correctly thanks a lot
[SOLVED] Cannot Access Queries.equal() on server side
more specifically, it's just sdk.Query.equal()
. the sdk.Query
is the same as the Query
in the web sdk. the big difference is just in how it's imported when doing import vs require. you can even do:
const sdk = require("node-appwrite");
const { Client, Databases, Query } = sdk;
that's how static functions are invoked. you don't need to instantiate an object
Recommended threads
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...
- Can't login or deploy functions in Appwr...
Hello, since i updatet to the appwrite cli 6.1.0 i can't login or deploy functions with the cli. When i call the command: "appwrite get account --verbose" i ge...
- Create admin user?
I'm not really sure how this is supposed to work, I installed Appwrite through docker-compose and set it up. When I launched the app and went into it, I created...