This is a take-home assessment that will leverage various frontend technologies to evaluate your aptitude. You can complete this at your own pace. Your recruiter will communicate when you should submit this assessment.
In this assessment you will utilize a Pokémon open API (GraphQL). This will demonstrate your knowledge and aptitude with GraphQL, which ReliaQuest heavily leverages.
Resources:
-
Must use JSS for all styling - No CSS files. The
<PokemonListPage />component (src/screens/PokemonListPage.tsx) already demonstrates this pattern using thetssfunction fromsrc/tss.ts. All styling contexts are already provided and implemented for you. -
Must use TypeScript for all files - Proper typing throughout with minimal use of
any. -
All components must handle loading, error, and empty states appropriately - App should not break in unexpected empty or error states.
Expand the existing list page with the following features. You will need to retrieve data from the useGetPokemons hook (src/hooks/useGetPokemons.ts) where the GraphQL query is defined.
-
Create list items that display:
- Pokémon name
- Pokémon number
- Pokémon type(s)
- Pokémon image (available through the API)
-
Each list item should have a hover effect
-
Show a proper loading state while data is being fetched
Implement search functionality so users can quickly find Pokémon.
-
Add a search input box that filters the list of Pokémon
-
Search should be case insensitive
-
Only Pokémon matching the search should be displayed
-
Show appropriate messaging when no results are found
-
For Entry- and Mid-Level Engineers: Searching will be client-side only (filter the results you already have). Please do not implement server-side searching, as you are being evaluated on your ability to manipulate a data set.
-
For Senior Engineers: See "Additional Senior Requirements" below - you will implement server-side search instead.
When a user clicks on a Pokémon, show a dialog/modal with detailed information.
-
Route-dependent modal: The dialog should open based on the route using
react-router(already set up in the app). For example:/pokemon/25. This also means the page should support deep linking--if you copy a link to a details dialog, you should be able to paste that link in the address bar and get to the same details dialog. -
Open on top of the list: The dialog should overlay the list page, whether you clicked a list item or pasted a link to the details page.
-
Fetch detailed data: Use GET_POKEMON_DETAILS query to fetch details for a single Pokémon
-
Handle states: Properly handle loading and error states for the detail fetch.
-
Display choice: What additional details you display and how you lay them out is up to you.
-
You may use a component library for the dialog/modal (e.g., Ant Design Modal) so you don't have to build one from scratch.
This assessment includes a testing component using Jest and React Testing Library, found in PokemonListPage.test.tsx. You can run it with yarn test
All three tests should pass when submitting.
Senior candidates must complete all entry/mid-level requirements AND the following:
Implement pagination for the Pokémon list:
- Add pagination controls (Previous/Next buttons, page numbers, or similar UI)
- Load Pokémon in chunks rather than all 151 at once (e.g., 20 per page)
- The GraphQL API supports pagination with the
firstandoffsetparameters - Maintain pagination state when navigating to and from the detail modal
- Search functionality should work with pagination
Replace the client-side search with server-side search:
- Update your GraphQL query to perform searching on the backend
- Use the API documentation and interactive playground to test your query
- Implement debouncing for the search input to avoid excessive API calls while typing
- Show a loading indicator while search results are being fetched
- Search should work in conjunction with pagination
———
When you're ready to submit:
- Ensure all tests pass
- Ensure the app runs without errors
- Follow the submission instructions provided by your recruiter
Good luck!