Error: GraphQL error: Cannot read property 'toISOString' of undefined