Task 241
Task 241
1. Backend:
- Set up a Node.js server with GraphQL API.
- Connect to a MongoDB database.
- Define a schema for blog posts with title, content, and author fields.
- Implement GraphQL queries for fetching all blog posts and a single blog post by ID.
2. Frontend:
- Create a Next.js application with two pages: a blog post list and a blog post details page.
- Use GraphQL to fetch data from the backend API.
- Display a list of blog posts on the list page with title and author.
- Display the title, content, and author of a single blog post on the details page.
3. Requirements:
- Use MongoDB Node.js driver for database interactions.
- Implement GraphQL schema and resolvers using Apollo Server.
- Use Apollo Client for GraphQL queries in the Next.js application.
- Style the application using CSS or a CSS framework (e.g., Tailwind CSS).
Evaluation Criteria
- Correctness and completeness of the implementation.
- Code quality, organization, and readability.
- Error handling and debugging.
- Performance and optimization.
Deliverables
- A fully functional Next.js application with a Node.js backend and MongoDB database.
- GraphQL schema and resolvers.
- Apollo Client configuration.
- CSS styling.
Time Limit
1 hour