0

I would like to convert the following postgres query to graphql for hasura. How can I do it?

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

1 Answers1

2

You can create a Postgres VIEW and track that via Hasura. From there you have all the same capabilities as a table: changing GraphQL field names, relationships, permissions, etc.

http://localhost:9695/console/data/sql is where you can write custom SQL and have it be tracked as a migration.

enter image description here

avimoondra
  • 886
  • 5
  • 9