简体   繁体   English

如何使用graphql从Firebase使用flutter从Cloud Firestore获取数据?

[英]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.是否可以使用graphql在flutter中查询Firestore firebase的结果。 I have to narrow down some results and have to bring them to the frontend.我必须缩小一些结果的范围,并将它们带到前端。 Please help me through this.请帮我解决这个问题。 Thanks in advance提前致谢

Yes, you are able to use GraphQL with Firestore, there is actually this other thread exploring this a little bit more in depth.是的,您可以将 GraphQL 与 Firestore 一起使用,实际上还有另一个线程对此进行了更深入的探索。

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.总结这些信息,您首先需要将 Firestore 的结果(例如您使用 .get 方法获得的结果)转换为一个数组,以便您可以将它们传递给 GraphQL。

There are also some examples online of this such as this git repository .网上也有一些这样的例子,比如这个 git repository You can use these as a guide in order to set your own implementation.您可以使用这些作为指南来设置您自己的实现。

Hope you find this useful.希望您觉得这个有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从 flutter 中的 firebase 云火库中查询数据 - How to query data from firebase cloud firestore in flutter (颤振)如何使用 Firebase 的 Cloud Functions 从 Firestore 检索文档 - (Flutter) How to retrieve document from Firestore using Cloud Functions for Firebase 从云中的 Firebase Firestore 获取数据 Function - Get Data from Firebase Firestore in Cloud Function 在 React 中从 firebase Cloud Firestore 获取数据 - get data from firebase cloud firestore in react 如何在反应中从firebase云Firestore获取数据 - How to get data from firebase cloud firestore in react 如何在Android中从Cloud Firestore Firebase获取或获取数据 - How to fetch or get data from Cloud Firestore Firebase in android 如何从Cloud Firestore获取Flutter应用程序的简单数据? - How to Get Simple Data From Cloud Firestore For Flutter App? 如何从Flutter中的云Firestore中获取、设置、更新和删除数据? - How to get, set, update and delete data from the cloud firestore in Flutter? 如何从 Flutter firebase firestore 数据库中获取这些数据? - How to get this data from Flutter firebase firestore database? 如何从 Firebase (Firestore) 获取数据到 Flutter 中的模型列表中? - How to get data from Firebase (Firestore) into list of models in Flutter?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM