Skip to content
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

Merged
merged 12 commits into from
Oct 19, 2023
Merged

Conversation

ayushtiwari110
Copy link
Collaborator

@ayushtiwari110 ayushtiwari110 commented Oct 4, 2023

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...

@ayushtiwari110
Copy link
Collaborator Author

The latest deployment for this branch is : https://web-app-client-git-bi-19-bacpacs-projects.vercel.app/
Go to /api/graphql to use the playground.
for testing use following id value in query: b058b3b9104de213

@ayushtiwari110 ayushtiwari110 marked this pull request as ready for review October 7, 2023 17:27
@ayushtiwari110 ayushtiwari110 self-assigned this Oct 16, 2023

// The connection string for mongodb connection.
const uri =
'mongodb+srv://ayushtiwari110:[email protected]/'
Copy link
Collaborator

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

Copy link
Collaborator Author

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.

Copy link
Collaborator

@bacpactech bacpactech left a 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.

src/app/api/graphql/route.js Outdated Show resolved Hide resolved
src/app/api/graphql/route.js Outdated Show resolved Hide resolved
src/app/api/graphql/route.js Show resolved Hide resolved
@bacpactech bacpactech changed the title Connected the Apollo GQL and MongoDB to /api/graphql route BI-19: Setup a GraphQL endpoint with a MongoDB database Oct 17, 2023
Copy link
Collaborator

@bacpactech bacpactech left a 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!

bacpactech
bacpactech previously approved these changes Oct 18, 2023
bacpactech
bacpactech previously approved these changes Oct 19, 2023
Copy link
Collaborator

@bacpactech bacpactech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very well done! 👏

@bacpactech bacpactech merged commit 90c5b75 into main Oct 19, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants