-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BI-19: Setup a GraphQL endpoint with a MongoDB database #9
Conversation
The latest deployment for this branch is : https://web-app-client-git-bi-19-bacpacs-projects.vercel.app/ |
src/app/api/graphql/route.js
Outdated
|
||
// The connection string for mongodb connection. | ||
const uri = | ||
'mongodb+srv://ayushtiwari110:[email protected]/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll prefer to store the string as the environment variable in GitHub.
Locally you can test it by creating a .env
file and store this URL over there.
Here's the link for the GitHub docs - https://docs.github.com/en/actions/learn-github-actions/variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I thought once I create bacpac MongoDB account, then i'll add that directly in .env file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Job! The code quality is very good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's finish the environment task!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very well done! 👏
Connected the Apollo GQL and MongoDB to /api/graphql route
Currently I have added a simple query which can find a college name by its id. Code Review is still in progress from my side and possibly some more optimizations I might do...