【问题标题】:How to use graphql to get data from Cloud Firestore from Firebase using flutter?如何使用 graphql 从 Firebase 使用 Flutter 从 Cloud Firestore 获取数据?
【发布时间】:2020-05-01 21:58:44
【问题描述】:

是否可以使用 graphql 在 Flutter 中查询 Firestore firebase 的结果。 我必须缩小一些结果的范围,并将它们带到前端。 请帮我解决这个问题。 提前致谢

【问题讨论】:

    标签: firebase flutter google-cloud-firestore graphql google-cloud-functions


    【解决方案1】:

    是的,您可以将 GraphQL 与 Firestore 一起使用,实际上 this other thread 对此进行了更深入的探索。

    总结这些信息,您首先需要将 Firestore 中的结果(例如通过 .get 方法获得的结果)转换为数组,以便将它们传递给 GraphQL。

    网上也有一些这样的例子,比如this git repository。您可以使用这些作为指南来设置您自己的实现。

    希望你觉得这很有用。

    【讨论】:

      猜你喜欢
      • 2022-06-24
      • 2021-04-17
      • 2019-10-17
      • 1970-01-01
      • 2020-08-23
      • 2022-09-23
      • 2019-07-11
      • 2021-04-13
      • 2020-03-17
      相关资源
      最近更新 更多