This is a Next.js React app interview challenge for the Edge & Node's Product Engineering team.
Create a private repo based on this one and add the interviewers as collaborators (IainM22
, cmwhited
, dnfodjo
, nasmr
, andrascodes
, Malak67
).
You can also email us a git bundle of your repo history if you prefer.
We recommend spending no more than 4 hours on this challenge. If you don't finish, that's ok.
Use any GraphQL client and styling solution you're comfortable with. The focus of this is more on general programming and problem-solving than on specific technologies.
In this exercise, you will create an Epochs table that has sorting, search and/or pagination. Data will be available at the endpoint provided in the .env file.
First off, watch the video to see what the end result should look like. (Note: The table in the video shows Indexers but for this assignment we will focus on Epochs, not Indexers)
Designs can be found here. Here is the Sketch file. All the assets can be found here.
- You can find the subgraph here and use the playground to see the schema and make queries: https://thegraph.com/explorer/subgraph/graphprotocol/graph-network-mainnet.
- For this challenge, we will query the Entity called
Epoch
. - After you get all of the epochs (or some of them, if you use pagination), render them in a table with the columns as in Designs.
- All columns should be sortable in
asc/desc
order. Default order should be by Epoch'sstartBlock
. Make use of GraphQL queries. - Search should only be implemented for Epoch's
startBlock
. Make sure to use a GraphQL query. - As a bonus, there are a few animations/transitions (check the video).
- Another bonus, the table should be horizontally scrollable on narrow screens.
- Clone this repository.
- Run
pnpm install
to install all dependencies. If you don't have PNPM you can install it using Node.js Corepack. - Run
pnpm dev
to run the development server. - Open
http://localhost:3000
in your browser.