Back

Is `usersDelete` available in Cloud?

  • 0
  • Self Hosted
  • Auth
  • Web
  • Cloud
danstevenson_reyt
22 Mar, 2024, 12:22

I have been developing a project locally, using Appwrite 1.5. I am now deploying to the Cloud version.

I have been using the usersDelete GraphQL method from a serverless function, which is authenticated with an API Key that has users.write permissions. This works fine locally, but when deploying the function runs but the requested user is not being deleted. Is the usersDelete method available on the Cloud version?

I cannot find documentation about usersDelete in either the 1.5 or Cloud docs, but have seen discussions about it and it clearly works in my local 1.5 version.

When running the function with logs, I can see the response from the invocation is "message": "" - so there's no indication of whether it has succeeded/failed, and there's no permissions or "method not available, did you mean..." error.

If usersDelete is not available on GraphQL Cloud, is there a similar method I could use and if so where is the documentation for it please?

Replication code (the environment variables and data has been confirmed through logs to be the correct ones):

TypeScript
        // delete auth account
        const authUserDeleteResponse = await graphql.mutation({
            query: `
              mutation DeleteAuthUser(
                $userId: String!
              ) {
            usersDelete(userId: $userId) {
                    status
                  }
              }
            `,
            variables: {
                userId
            }
        });
};
TL;DR
Developers encountered an issue with the `usersDelete` method while deploying to the Cloud version from Appwrite 1.5. `usersDelete` method might not be available on the Cloud version. They are seeking information on the equivalent method or solution and documentation, as the current method works locally. The response is blank without any success/failure indication.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more