This application was scaffolded using create-react-app
, with node version 14.15.1
npm i
npm start
should get you going.
This app expects a server running locally on port 4000. See separate instructions for how to run the server.
Apollo client has been set up and pointed at the correct API.
-
Contains the
gql
strings you should need -
Renders the chart described in the exercise document. Props you should care about:
-
data
:[{date: String, risk: Number, taskCount: Number}]
— this should already work with the data you receive from the API -
highlightAreas
:[{start: String, end: String}]
— an array of objects defining the edges of areas to highlight on the chart, as date strings parseable bynew Date
-
onAreaSelect
:function
— callback for when the user selects an area of the chart. This will be called with a{start: String, end: String}
object as above. The chart component is unopinionated about the minimum or maximum size of a highlight.
If you'd like to introspect the query and mutation a little more, there should be docs available at localhost:4000/graphql.
How you structure the rest of the application and the flow of data is up to you. Good luck! :)