Announcing our MongoDB Data Connector (Beta)

Connecting your database
- Go to Data > Manage in your application.
- Check if your MongoDB data connector is pre-connected to your Hasura instance. You can do this by selecting the Data Connector Agents dropdown from the Data Manager.
- If the MongoDB data connector is not connected and you have used the docker-compose.yml file mentioned above, use the following details to connect to your agent:
- Agent Name: mongodb
- URL: http://mongo-data-connector:3000
- After that, you can click Connect Database to continue to the database connection screen.
- If you’re using the provided docker-compose.yml file you can connect your database using the following credentials:
- Database Name: mongodb
- Connection: mongodb://mongouser:mongopassword@mongodb:27017
- db: demo
Track your first Collection
- Once your database is connected, select the database name from the left-hand sidebar.
- You will see your collections listed here. Choose a collection and click on "Track Selected."
- Congratulations! Your selected collection is now added to your GraphQL API.
Run your first query
- In the header, select "API" to go to GraphiQL, our API testing utility.
- Utilize the explorer located on the left-hand sidebar to assist you in composing your query (the resulting query will be populated in the body area).
- When you’re ready, click on the play button to execute your GraphQL query.
- Your query’s result will be populated in the right-hand column of the interface.
- Schema Generation: We support tracking collections containing a validation schema. This schema serves as the backbone for generating your GraphQL schema.
- Document Filtering: Enjoy the convenience of filtering on top-level fields within your documents. This feature allows you to access and manage only the data you require.
- Field-Level Permissions: Security is paramount. We've incorporated permissions on the same top-level fields, reinforcing an additional layer of data protection.
- Federated Relationships: Experience the power of connecting your data sources. We enable federated relationships from MongoDB to other data sources such as PostgreSQL, enhancing the interconnectivity of your data.
- 🗂️ Enhanced querying and permissions for embedded documents
- 🔗 Improved cross-collection relationships
- 🔗 Improved cross-datasource relationships (inbound joins to MongoDB, currently supporting from MongoDB)
- 🤝 A customizable GraphQL schema, moving beyond the dependency on validation schemas
- and the freedom to create your own logical models, providing a powerful escape-hatch from any 🪄 auto-magic
Related reading