We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export const todosMirageRoutes = (server: Server): void => { server.get('/todos', (schema) => { return schema.todos.all() }) server.get('/todos/:id', (schema, request) => { return schema.db.todos.find(request.params.id) }) server.delete('/todos/:id', (schema, request) => { return schema.db.todos.find(request.params.id).destroy() }) }
schema.db.todos.find works well, but there is no method on schema.db.todos to return all todos...
The text was updated successfully, but these errors were encountered:
and schema.todos.all() works in js but breaks in typescript.
what is the schema.db.todos equivalent?
Sorry, something went wrong.
Same issue here.
This worked for me, also do check #677 and #682
const addCollectibleRouteHandlers = (server: typeof mockServer) => { server.get("/collectible", (schema) => { return schema.all("collectible").models; }); }
No branches or pull requests
schema.db.todos.find works well, but there is no method on schema.db.todos to return all todos...
The text was updated successfully, but these errors were encountered: