Hello, i’m facing a pretty strange issue, and i have no idea how i can solf it.Its in a NextJS Website.
I use “estimatedReadingTime”: round(length(pt::text(body)) / 5 / 180 ),
in a query, to get as the field says the estimated reading time.
When i use this query in getStaticProps, everything works just fine and i get the estimated Reading time.
But when i use the exact same query in a API route (NextJS /api/..some endpoint) i get an error.
When i remove only this line for estimatedReadingTime, the query works, so the query and fetching works fine in the API but the calculation von the readingtime give me an error.
The error is: „queryParseError”, expected ‘)’ following function arguments
Does anyone know what could be wrong here?
Thanks
Jul 4, 2022, 12:46 PM