Jan 24, 2020

GraphQL takes a big leap forward with MongoDB

GraphQL and MongoDB

MongoDB announced that developers can now interact with their MongoDB databases using the GraphQL API standard. For GraphQL, MongoDB's support signals its growing importance in shaping the future of software development.

What’s GraphQL? It’s an up-and-coming alternative to traditional API standards, like REST and SOAP. From the official documentation: "GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data."

With GraphQL, developers make API requests to a single endpoint, but structure their queries to ask for specific data from any number of resources. The API then compiles and returns data with the same structure as the original request.

GraphQL matters. GraphQL's flexibility makes it easy for developers to request and structure exactly the data they need in just a single trip to the database. While not a silver bullet, it offers developers a new way to build data-driven applications.

And it’s gaining popularity. In 2016, just 5% of developers had ever used GraphQL. In three years, that number has skyrocketed to nearly 38%.

Today GraphQL is used at many big tech companies, like Facebook, GitHub, Pinterest, Coursera, and Shopify.

Now it works with MongoDB. MongoDB’s new features make adding GraphQL support easy for developers.

Developers can use Stitch, MongoDB’s serverless platform, and Atlas, a cloud hosted version of a MongoDB database. After connecting these services and populating a database, developers can make requests to their backend from a JavaScript application using Stitch’s free SDK.

What’s the impact? MongoDB’s new features are a noteworthy validation of both GraphQL and serverless architecture as valuable development tools. A fusion of these fledgling technologies, with the backing of a big database player, marks a big step forward for the entire ecosystem.

Want to get more of these in your inbox?

Subscribe for weekly updates from the Software team.