MongoDB Adds GraphQL Support
Written by Kay Ewbank   
Monday, 03 February 2020

The developers of MongoDB have announced that you can now use GraphQL in JavaScript applications to interact with MongoDB documents. The facility has been added through Stitch integration in MongoDB Atlas clusters.

MongoDB is a NoSQL document database that stores its documents in a JSON-like format with schema. GraphQL is a query language for APIs originally developed for internal use in Facebook before being made open source. 

mongodblogo

GraphQL means you can create a query that works on and returns only the fields you want from an API, similar to a MongoDB projection or a SQL query. This is much simpler than making an HTTP request to an API endpoint and receiving the full payload of that resource as a response.

Until now if you wanted to use GraphQL in a JavaScript app on MongoDB data, you'd need a dedicated web service with contained schema information, resolve functions with database logic, and other middleware logic to sit between the database and the client facing application.By making use of Stitch for authentication and GraphQL queries makes things much easier. MongoDB Stitch is a serverless platform that handles server interactions. It is built on top of MongoDB Atlas, and automatically integrates the connection to your database. Developers can connect to Stitch through the Stitch Client SDKs, which are available for many platforms including JavaScript, iOS, and Android

The Stitch GraphQL API  lets client apps access data stored in a linked MongoDB cluster using any standard GraphQL client. Stitch automatically creates GraphQL types for every linked collection that has a defined document schema and evaluates role-based permissions for all GraphQL requests.

mongodblogo

More Information

MongoDB Website

Related Articles

Amazon Ditches MongoDB, Launches Rival

MongoDB 4 Released

MongoDB 4.0 Gets Multi-Doc ACID Support

MongoDB Stitch Makes App Development Easier

MongoDB 3.2 Released 

MongoDB 3 Announced

Facebook GraphQL Gets Own Foundation

Open Source GraphQL Engine Launched

Graphcool Eases Your Way Into GraphQL

GraphQL Leaves Tech Preview

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Hour Of Code 2024 Is About To Kick Off
04/12/2024

This year the event that aims to provide a coding experience for all school students and anyone else who wants to join in runs between December 9th and 15th and includes new activities. Let's find out [ ... ]



Rust And C++ Should Be Friends?
20/11/2024

The Rust Foundation has just released a statement on Rust and C++ interoperability and Google is ponying up $1000,000 to see that it gets done.


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info