Surya Narayan
Surya Narayan

Reputation: 149

How to use graphql to get data from Cloud Firestore from Firebase using flutter?

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

Upvotes: 7

Views: 8866

Answers (1)

rsalinas
rsalinas

Reputation: 1537

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.

Upvotes: 10

Related Questions