Blog fauna graphql foundation

Announcing Fauna’s membership in GraphQL Foundation

We’re thrilled to announce Fauna’s membership in the GraphQL Foundation. With this membership, we join an elite group of innovators in the GraphQL space, including 8base, Elementl, Expedia, Prisma, Shopify, and Twitter.

"At Fauna, we have seen first-hand the productivity and architectural benefits GraphQL offers developers. We believe that an open ecosystem and shared specification are a benefit to all. We’re excited to contribute to the GraphQL community and collaborate on its continued innovation." - Matt Freels, CTO, Fauna, Inc.

FaunaDB + GraphQL

GraphQL has been of central and growing importance at Fauna. Earlier this year, in June, we released native GraphQL functionality into FaunaDB. This feature set supported importing GraphQL schemas into FaunaDB via the FaunaDB Console. The update also included an integration with GraphQL Playground, which is one of the most popular ways developers interact with GraphQL.

It’s important to mention that FaunaDB brings same guarantees to GraphQL that we do to FQL (Fauna Query Language). FaunaDB's GraphQL API leverages the Calvin-inspired shared core to offer developers uniform access to transactional consistency, user authorization, data access, quality of service (QoS), and temporal storage.

  • Temporality: FaunaDB is the only database that provides built-in temporality support with no limits on data history. With per-query snapshots, any API in FaunaDB can return data at any given time.
  • Consistency: FaunaDB offers the highest consistency levels for its transactions. These strong consistency guarantees are automatically applied to all APIs.
  • Authorization: Unlike most databases that control access at a table level, FaunaDB provides access control at the document level. This fine-grained access control is applicable to all APIs, be it GraphQL or SQL.
  • Shared Data Access: In keeping with Fauna's dedication to modern polyglot development, data written by one API (e.g., GraphQL) can be read and modified by another API (e.g., FQL). In contrast, most other databases limit APIs to their specific datasets.
  • QoS: FaunaDB’s built-in prioritization policies for concurrent workloads are enforced at the database level or with access keys. All API access automatically adheres to these QoS definitions.

We also work with popular IDEs and GraphQL providers, including Apollo and Hasura. FaunaDB offers a generous free tier to help you kick the tires on your project. Try it out now 😄

Growing importance

For FaunaDB, GraphQL has grown from being a nice-to-have feature to a core piece of our product offering and company strategy. Indeed, in the last few months, our Monthly Active user adoption for GraphQL has grown to 40%:

This means that 40% of users who use FaunaDB this month are running GraphQL queries. We expect this percentage to grow even more throughout this year as we continue to add rich features to our GraphQL implementation.

Continuing to contribute with partial updates

Since our summer release of native GraphQL, we’ve continued to release important features for our developer community, including partial schema updates and batch solutions.

A quick aside to explain partial update:

In order to tell to the import process to not create all of these elements automatically, we need to use Fauna’s built-in @embedded directive. If annotated with the @embedded directive, no ID field nor CRUD operations are generated for the given object.

We can create a file with an updated schema using the @embedded directive for defining our new Address object type:

type User {
username: String! @unique
address: Address
}
type Address @embedded {
street: String!
city: String!
state: String!
zipCode: String!
}

Conclusion

Joining the GraphQL Foundation takes us one step closer to becoming an inextricable piece of this rich landscape of bleeding edge web tools. We are excited to continue to innovate in this space. We know that GraphQL is a core aspect of the JAMstack ecosystem, and intend to further cement FaunaDB as the default database for modern web projects. 

What other features for GraphQL would you like to see implemented in FaunaDB? Check out how others are using GraphQL in Fauna’s Community Slack, and describe any other features that would make FaunaDB an obvious choice for your next project.