Back

AppWrite Flutter Sdk Batch queries in GraphQL is not supported

  • 0
  • Databases
  • Flutter
waheedoof
8 Nov, 2023, 11:17

i want to send multiple CRUD operations in one request in flutter app i see graphQL and it is working on python server but in flutter only works with one query , how can i do that ??

TL;DR
The user is having trouble performing batch queries in GraphQL using the AppWrite Flutter SDK. They have tried concatenating mutations and using a Python code, which works fine. However, in the Dart code, they are unable to add a second query or create a list of queries. The user is looking for a solution to send multiple CRUD operations in one request in a Flutter app using GraphQL.
waheedoof
12 Nov, 2023, 09:34

hi

Drake
12 Nov, 2023, 22:07

Can you share both the python and dart code?

waheedoof
22 Nov, 2023, 07:37

python code with list of queries

waheedoof
22 Nov, 2023, 07:37

dart code with only one query and i can not make list of queries !!!?

Drake
22 Nov, 2023, 15:31

Python isn't strict with typing so you don't get any warnings. Dart is different

Drake
22 Nov, 2023, 15:35

I think you can still batch multiple in that mutation, right?

waheedoof
23 Nov, 2023, 06:33

Python Code is work and do all queries fine, but in dart code there is no ability to add second query !

Ernest
23 Nov, 2023, 09:37

You can concatenate mutations like this but I wouldn't recommend it unless they are somehow related.

TypeScript
mutation updateSomeStuffs($uid: String!, $birthday: String!, $imgId: Int!, $albumId: Int) {
  updateBirthday(userId: $uid, birthday: $birthday) {
    success
  }
  
saveImage(imgId: $imgId, albumId: $albumId) {
    success
    status
  }
}
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