Hasura + NoSQL = 🚀 Announcing GA for MongoDB database support
- Instantly create a GraphQL API on MongoDB
- Efficiently query between your MongoDB collections
- Join a MongoDB connection to another data source
… and more!
“We are looking to have GraphQL as our foundational approach for whatever data we serve to our applications, and Hasura’s gonna be the facilitator for piecing that together for us and not having to write our own resolvers. Our longer term vision has changed where we don’t want a data source that's going to tie us to a cloud provider, and using MongoDB with Hasura will help us be more cloud agnostic.”
- Fortune 500 healthcare services provider on migrating to MongoDB and modernizing their infrastructure with Hasura
Generating your GraphQL schema for MongoDB
- Logical models are now available for MongoDB, allowing you to write and customize your schema for your MongoDB collections (and views).
- This includes a new interface for importing schemas for collections from a single document sample, with the flexibility to share models and permissions across collections and even parts of collections (read more in our docs for more on how to author your own logical models).
- Validation schemas remain accessible for inferring your schema directly from your database, adding an extra layer of convenience and efficiency (read more in our docs for more information on validation schemas in your MongoDB database).
- The added ability to efficiently author in-database relationships between collections in your MongoDB database.
- Enhancements to our query capabilities by introducing
where
clauses and permissions on embedded (or nested) documents, providing you with more control and precision in handling your data permission structures. - An additional enhancement for adding MongoDB views to your API, which allows for custom views of your data using aggregation pipelines.
- Enhanced functionality for creating relationships between remote databases using GraphQL in Hasura, including a visual builder and the ability to specify your MongoDB collections as targets for remote relationships.
Blazing-fast queries
- Field-level projection for document retrieval, even for embedded documents using runtime-generated `$where` queries.
- Permissions are pushed down to the data source, which also includes embedded documents.
- Within the database, cross-collection relationships are available through `$lookup` queries.
- Lateral permissions across those relationships are made possible with query-level pushdowns.
- We’ve also enabled cross-database joins between MongoDB and other data sources, with permissions handled at their respective data sources and the join itself taking place in-memory within Hasura.
NoSQL, no restrictions
- Allowing connections and relationships between MongoDB and other types of databases, something not commonly found with other providers.
- Not placing unnecessary limits on your work with any fixed-system restrictions on depth limits or resolvers.
- Using complex arrangements of data with our support for embedded array objects, adding more flexibility to your projects.
- Offering the ability to host your API on your own premises, giving you more control over your hosting while also providing our own cloud-hosted version if you prefer (you can read more on setting up your Cloud Hasura instance with MongoDB).
The same Hasura you know and love
- Secure authentication for providing user access to your API
- Authorization and access control to keep your records safe and secure
- Blazing-fast query compilation and execution
- Query caching for even more performance on top of efficient query compiling
- Data federation across different data sources
- An integration framework for external business logic
- Security for protecting against API scraping, malicious attacks, and excessive data exposure
What’s next?
Related reading