Is it possible to query results from Firestore firebase in flutter using graphql. I have to narrow down some results and have to bring them to the frontend. Please help me through this. Thanks in advance
Using GraphQL with Firestore would not make things faster -- since Firebase SDKs already talk directly to the backend database the connection is as fast as it can be. GraphQL can be used with Firestore, but you would mostly do so if you had a specific reason to prefer the data composition or query patterns it enables.
Combine data in GraphQL Next to customer data, we also have order data in the Firebase Realtime Database. To combine the customer data with the order data, we need to create the query to get the orders from the Firebase Realtime Database. Both the schemas are linked in index. graphql in the project's root.
Yes, you are able to use GraphQL with Firestore, there is actually this other thread exploring this a little bit more in depth.
Summarizing that information, you first need to convert the results from Firestore (those you obtain with the .get method for example) into an array so that you can pass them to GraphQL.
There are also some examples online of this such as this git repository. You can use these as a guide in order to set your own implementation.
Hope you find this useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With