[英]How to convert SQL CONCAT To GRAPHQL query for hasura
I would like to convert the following postgres query to graphql for hasura.我想将以下 postgres 查询转换为 hasura 的 graphql。 How can I do it?我该怎么做?
Select CONCAT(cast( "vendorId" as text),split_part("customerUserName",'+', 2)) as id,"vendorId","customerUserName" from "VendorCustomertList"
You can create a Postgres VIEW and track that via Hasura.您可以创建Postgres VIEW并通过 Hasura 进行跟踪。 From there you have all the same capabilities as a table: changing GraphQL field names, relationships, permissions, etc.从那里您可以拥有与表相同的所有功能:更改 GraphQL 字段名称、关系、权限等。
http://localhost:9695/console/data/sql is where you can write custom SQL and have it be tracked as a migration. http://localhost:9695/console/data/sql是您可以编写自定义 SQL 并将其作为迁移跟踪的地方。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.