I have a loader function in order to fetch chefs from a database. So that loader receive an array of ids
and what's is strange is that the ids
have a readonly
type.
When I try to pass that read-only type to the database query, it gives an error.
How can I fix the type definition?
Source code: https://github.com/LauraBeatris/graphql-with-nextjs/blob/master/pages/api/loader.ts