From Slack discussion https://fauna-community.slack.com/archives/CALF684S2/p1615408703019700
I’m fine with the traditional tables/columns and relationships, but I’m getting stuck hard on anything that’s related to faunadb concepts, such as indexes, roles, membership, FQL. Not having a way to “draw” anything visual is a real limitation and it’s slowing me down a lot.
Hey people, does this help? Modernizing from PostgreSQL to Serverless with Fauna Part 1
Although it was an article focused on postgres, I specifically wrote this to help in such decisions. - Brecht De Rooms
Thanks for the blog article, I’ll read it
I’ve already read (mutliple times) the whole FaunaDB documentation.
I feel like what’s missing to FaunaDB is some kind of framework about how to do things the right way. By “the right way”, I mean in a testable, debugable, observable way.
The current documentation explains how to do things, but don’t provide strong foundations about how to handle an actual project. That’s up to the developers to figure that part out, and it’s not straightforward. Real-world examples like Fwitter help, I’ve been reading tons of OSS code about faunadb projects and got inspiration from many.
What I need the most regarding FQL is:
- Write queries/indexes/roles in a testable/reproductible way
- Test queries and associated permissions (really bad DX about permissions right now, very hard to pinpoint the actual issue because error message don’t provide any guidance)
- Understand what permissions a query/index needs to work properly (kinda related to previous point)
- Quickly test a query using different roles to ensure it works as I expect (or, to pinpoint misconfiguration issues)
- Having something that’s visual to design things would be very useful, I don’t know what exactly, I just know I get lost with my mental model when designing indexes, roles
A few ideas:
- Executing FQL from the Web Shell with different roles will help.
- Having some kind of UI “Role checker” when using FQL in roles would be quite useful too, I spent hours yesterday before figuring out my roles read/update didn’t behave the way I meant it. And it still doesn’t work as I want and I don’t know how to fix it. Testing is too slow. Having some built-in “scenario/presets” for each roles to test them through the Web UI would be quite efficient. Something like a list of persona with different roles/permissions (based on the existing roles in the db) and displaying whether read/write/update/delete works for each role would be a huge gain.
- GitHub - fauna-brecht/fauna-schema-migrate is meant to help with automation/migration, haven’t used it yet (I have 2 collections and it felt like “too much” at this point, at first glance, but I might reconsider that)