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
- Gitlab function automation
Im trying to automate my function deployment using gitlabs ci/cd pipeline. Im currently failing trying to use the appwrite cli to create a new deployment. ```...
- User Limit Bug
How can I disable Appwrite client SDK registration? I have heard the solution to set the User Limit to 1. But everytime I set it to one it will automatically se...
- Create file is listing files instead of ...
This is a bit strange but, I cannot create files from within a funcion. I have tested with latest SDKs versions of node and python, both instead of creating the...