Closed prakhargupta1 closed 1 year ago
Rate limitation on the Xano API that is being used:
@prakhargupta1 It's possible to "fake" a backend in-memory. For example:
import { createQuery } from "@mui/toolpad/server";
const customers = [{ name: "John Doe" }];
export async function getCustomers() {
return customers;
}
export const addCustomer = createQuery(
async ({ parameters }) => {
customers.push({ name: parameters.name });
},
{
parameters: {
name: {
typeDef: { type: "string" },
},
},
}
);
We may also be able to leverage @faker-js/faker
to generate data for demonstration purposes.
Thanks, just did this and removed dependence on Xano APIs. Also, used form and file upload component in the Add user flow.
Link to further details.
We'll put the working app in https://github.com/mui/mui-private repo and a showcase version in: https://github.com/mui/mui-public