Bytesized • Breaking down the most important ideas in software development.

Instant distributed, scalable and secure GraphQL endpoints with FaunaDB

There are several things to consider when setting up a GraphQL endpoint; choosing a suitable database, handling the n+1 problem, using a cache, security rules.
GraphQL has moved the many requests problem from the HTTP layer to the database layer. Instead of many REST calls, we only need to execute one GraphQL request.
However, one GraphQL request often results in many database calls, which basically moves the performance problem to the database layer.

FaunaDB is a distributed database that comes out-of-the-box with GraphQL and a flexible security layer. Import your schema, let FaunaDB generate the collections and indexes to support your schema, and you can benefit from a scalable, distributed GraphQL endpoint in 30 seconds. Due to the composable nature and graph-like querying features of the Fauna Query Language (FQL), FaunaDB can offer a GraphQL endpoint that compiles GraphQL queries to FQL 1:1.
No more n+1 problem, no need of a cache, and since each GraphQL query translates to one query, you can also take advantage of FaunaDB's strong consistency and flexible security model.

Enjoying these posts? Subscribe for more

Subscribe to be notified of new content and support Bytesized! You'll be a part of the community helping keep this site independent and ad-free.

You've successfully subscribed to Bytesized
Great! Next, complete checkout for full access to Bytesized
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.