Open sachaarbonel opened 6 years ago
@Sach97 While we don't explicitly support row types, there is an escape hatch (for all types that are not known to graphql-engine) using Postgres literals. In your case, you can do this:
mutation {
insert_on_hand(objects: [{count: 10, item: "('fuzzy dice',42,1.99)"}]) {
returning {
count
item
}
}
}
Thank's a lot for your response ! It will do the job
@0x777 , couldnt you hypothetically scrape custom postgres types, and support them?
this would be a big boost in performance, as my schema is littered with one-to-one relationships and id love to consolidate them into row types to bring my tracked tables/relationships down
Hi guys, I created a table with the Hasura sql console with a composite type like in the Postgres docs. I can do queries like this
And I get the response as expected:
But when I try to do a mutation like this it doesn't work
I get this error:
Subscriptions work by making the insert in the hasura sql console. So composite types or "user defined" types work out of the box but is it possible to add official support for it ? Thank's for the great work on the engine guys :+1:
EDIT: I tried that way too