Generate a MongoDB Database for a GraphQL Backend

Share this video with your friends

Send Tweet

We will be setting up our GraphQL backend and creating a new MongoDB database.

Start by cloning the backend repo and installing the dependencies. After that, you need to use the seed file provided to generate a new database by running node src/seed.js.

Once you have a database you can run the project and navigate to [localhost:3000/graphiql](http://localhost:3000/graphiql) and explore the GraphQL IDE.

Mohammed Zeeshan
~ 2 years ago

Hi, it would have been really really helpful if you could show how to connect to mongodb and robo 3t. Been stuck for the second weekend, exploring tutorials to get that part working :(

Mohammed Zeeshan
~ 2 years ago

Hi awesome folks, can anyone show how to connect the database? 🥹😭🙏

When i enter the the url "mongodb://localhost/mysurfshop" inside Robo3T it doesn't accept and i get an error

Lucas Minter
~ 2 years ago

Hey Mohammed, this would be a great question to ask in the egghead Discord. We have a channel where learners can ask for help if you are still stuck on this error.