A critical aspect of BusinessU is managing classes and the students inside them. In order to facilitate communication between the frontend and the server, we use GraphQL, and for our frontend framework we use React.
The goal of this task is to give us an idea of your skill level before starting work for BusinessU.
For this task, implement a simple GraphQL server and frontend that is responsible for creating / updating / deleting classes.
Submit your code in a private repo and share with me. I am sammarks on BitBucket or sammarks on GitHub.
Here is the GraphQL schema you'll need to use when implementing this:
type Class {
id: ID!
name: String!
}
type Query {
classes: [Class!]!
}
input ClassInput {
name: String!
}
input UpdateClassInput {
id: ID!
patch: ClassInput!
}
input DeleteClassInput {
id: ID!
}
type ClassPayload {
class: Class!
}
type SuccessPayload {
success: Boolean!
}
type Mutation {
createClass(input: ClassInput!): ClassPayload!
updateClass(input: UpdateClassInput!): ClassPayload!
deleteClass(input: DeleteClassInput!): SuccessPayload!
}
When implementing the GraphQL schema, we would discourage using libraries that automatically generate schema and resolvers. We want to make sure you know / can figure out GraphQL, not that you know how to use a tool that generates code.
The frontend should have an interface for creating / editing / deleting classes.
You don't have to lay the UI out this way, but imagine each class is a box with a header containing the name, and inside that box is a placeholder for eventually adding student management (but not required for this task).
- Use the Apollo framework for the server-side and client-side GraphQL code. It'll make this easier!
- Use ant.design as the UI framework for your frontend. This is the framework we use at BusinessU. Other than that, design isn't important for this task. Don't spend too much time making it pretty! Just make it work.
- Unit tests for backend code
- Typescript (highly recommended)