将 Graphql 映射到 Grahpql+-(Dgraph 版本)
Mapping Graphql to Grahpql+- (Dgraph version)
我使用 Dgraph 和 Postgres 作为我的数据库。我正在使用 elixir 和 ecto 来处理从前端到 postgres 数据库的 graphql 实现。我现在需要将 graphql 查询映射到 dgraph 版本的 graphql (graphql+-),以便我可以使用 graphql 的强大功能来仅获取我需要的数据。是将 graphql 映射到 graphql+ 的最佳方式吗?您甚至会怎么做?还是有另一种方法来做到这一点。我试图将 graphql 查询直接传递给 dgraph,但正如您想象的那样,这是行不通的。还有没有想过的方法?
目前看来,我不这么认为。 GraphQL+- 不支持所有 GraphQL 功能,因此您必须编写一个从 GraphQL 到 GraphQL+- 的转换器。
来自官方文档:
We’ve modified the language to better support graph operations, adding and removing features to get the best fit for graph databases.
我使用 Dgraph 和 Postgres 作为我的数据库。我正在使用 elixir 和 ecto 来处理从前端到 postgres 数据库的 graphql 实现。我现在需要将 graphql 查询映射到 dgraph 版本的 graphql (graphql+-),以便我可以使用 graphql 的强大功能来仅获取我需要的数据。是将 graphql 映射到 graphql+ 的最佳方式吗?您甚至会怎么做?还是有另一种方法来做到这一点。我试图将 graphql 查询直接传递给 dgraph,但正如您想象的那样,这是行不通的。还有没有想过的方法?
目前看来,我不这么认为。 GraphQL+- 不支持所有 GraphQL 功能,因此您必须编写一个从 GraphQL 到 GraphQL+- 的转换器。
来自官方文档:
We’ve modified the language to better support graph operations, adding and removing features to get the best fit for graph databases.