3 ms·
While this is super neat, this and the amplify thread can't help but make me wonder: Is everyone really this okay with their API always being 1-to-1 with their
by IceDane 5y ago
While this is super neat, this and the amplify thread can't help but make me wonder:
Is everyone really this okay with their API always being 1-to-1 with their DB models?
In my experience, that kind of setup is only viable for the smaller, simpler projects and otherwise you always run into something where you'd really prefer to have a layer between you and your database.
I am currently using graphql at work and this is a very hard requirement for us. Our database schema is not translated literally into graphql(or the other way around) and this is very intentional. The whole idea of the API layer is to be able to make changes to your internals without breaking all your consumers.
This was a problem with amplify(though the least of the problems we had) and it seems to me this is also a problem here, as it is with Hasura and postgrest.
- deleted 5y ago[deleted]
- steve-chavez 5y ago> The whole idea of the API layer is to be able to make changes to your internals without breaking all your consumers. You can do so by not exposing tables and instead use views and stored functions/procedures. See https://postgrest.org/en/v9.0/schema_structure.html#schema-isolation https://postgrest.org/en/v9.0/schema_structure.html#schema-i...