Back

GraphQL syntax errors after Cloud update to 1.5

  • 0
  • GraphQL
  • Cloud
danstevenson_reyt
29 Apr, 2024, 13:44

I am using GraphQL queries in lots of places in my app. An example:

TypeScript
const usersProfile: IQueryDatabasesDocumentsResponse = await graphql.query({
            query: `
      query GetAccountByDisplayName($queries: [String!]!) {
        databasesListDocuments(
          databaseId: "${DATABASE_ID}"
          collectionId: "${getCollectionId(CollectionNames.USER_PROFILE)}"
          queries: $queries
        ) {
          total
          documents {
            _id
            data
          }
        }
      }`,
            variables: {
                queries: [Query.equal("user_id", userId)]
            }
        });

These have worked fine on Cloud 1.4, but now I am getting syntax errors everywhere. "AppwriteException: Invalid query: Syntax error"

Please urgently suggest a solution to resolve these errors.

TL;DR
Developers are experiencing GraphQL syntax errors after updating to Cloud 1.5. The issue seems to stem from the update to "appwrite": "^14.0.1". The suggested solution is to carefully check the syntax and ensure it aligns with the specifications of the new version, as there have been changes that may be causing the errors.
Kenny
29 Apr, 2024, 13:48

What version of the sdk are you using?

danstevenson_reyt
29 Apr, 2024, 13:50

Was using "appwrite": "^13.0.2", and have just updated to "appwrite": "^14.0.1",

Kenny
29 Apr, 2024, 13:51

and you're still experiencing issues with 14.0.1?

danstevenson_reyt
29 Apr, 2024, 13:52

Yes, same erorrs

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