Schema without graphql, CORS, and a few other questions

Hey all - I’m new to FaunaDB and have loved it so far!

I’ve got some questions - is it possible to define a schema somehow without using GraphQL? I’m currently able to send post requests to my endpoint locally with any parameters and it saves. I’m curious how people use this in practice to prevent this, and how to implement CORS.

Also, is there anyway to implement secure forms? I’m not aware of a way to use captcha without communicating with a server and haven’t been able to find any info on this.

Lastly, is it possible to implement Stripe with FaunaDB? I’m curious if anyone has been able to do this.

Thank you!

Not out of the box, you can technically write that completely yourself by writing User Defined Functions that interpret a certain schema. I hint at it in the third part of an upcoming blog (written, not yet out) but I didn’t provide such an example yet. In essence, you are writing the validation yourself in pure FQL, which is feasible but quite some work initially.

Not that I’m aware of, so I can’t help you there. I would just use serverless functions specifically for your auth logic. You probably want to send emails on register as well which is kinda impossible to get secure without backend logic unless Fauna would provide it for you out of the box. You can access the db straight from the frontend, for some paths in your application that will make sense, for others it doesn’t.

I would assume the same here. You need a serverless function for that path. Although I might be wrong, I worked on multiple products with stripe involved but was never the one implementing that part. You could check out Cloudflare workers and Fly.io in case you are concerned that you would lose the multi-region aspect.