[英]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.