I have come to postgraphile yesterday from a couple of years with Hasura. I was stunned at what PG does out of the box. My main sense of loss is around the GQL api that PG offers, relative to Hasura. If I have Customer with a foreign key to an Address, and I add the nested mutations plugin, I can say this:
mutation MyMutation {
createCustomer(
input: {customer: {addressToAddressId: {create: {line1: "5", line2: "The Street"}}, firstName: "Breda", lastName: "Smith"}}
) {
address {
id
}
customer {
id
}
}
}
But with Hasura I would be able to say something like :
mutation MyMutation {
createCustomer(input:{firstName: "Breda", lastName: "Smith", address:{line1: "5", line2: "The Street"}}) {
address {
id
}
customer {
id
}
}
}
How can I configure PG so it can do this kind of mutation?