【问题标题】:How to convert SQL CONCAT To GRAPHQL query for hasura如何将 SQL CONCAT 转换为 hasura 的 GRAPHQL 查询
【发布时间】:2020-11-14 02:43:36
【问题描述】:

我想将以下 postgres 查询转换为用于 hasura 的 graphql。我该怎么做?

Select CONCAT(cast( "vendorId" as text),split_part("customerUserName",'+', 2)) as id,"vendorId","customerUserName"  from "VendorCustomertList"

【问题讨论】:

    标签: sql postgresql graphql hasura


    【解决方案1】:

    您可以创建一个Postgres VIEW 并通过 Hasura 进行跟踪。从那里您可以拥有与表相同的所有功能:更改 GraphQL 字段名称、关系、权限等。

    http://localhost:9695/console/data/sql 是您可以编写自定义 SQL 并将其作为迁移进行跟踪的地方。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-13
      • 2021-08-21
      • 2020-02-04
      • 1970-01-01
      • 2020-07-19
      • 2021-10-11
      • 2017-10-29
      • 2015-04-21
      相关资源
      最近更新 更多