arrow-left arrow-right brightness-2 chevron-left chevron-right circle-half-full dots-horizontal facebook-box facebook loader magnify menu-down rss-box star twitter-box twitter white-balance-sunny window-close
Instant distributed, scalable and secure GraphQL endpoints with FaunaDB
1 min read

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

Already have an account? Sign in
You've successfully subscribed to Bytesized Code.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info is updated.