TripleSpeederT
Convex Community3y ago
6 replies
TripleSpeeder

Impersonate user / create test content

I'm working on a site that has a lot of user-generated content. I'm wondering what strategy I can follow to generate test content? Using the import command looks difficult, as my schema has a lot of relations, so i would need to carefully craft the import data making sure to always reference the correct IDs. I would prefer to just call the regular mutations to create data, but most mutations are requiring a logged in user.
Are there any best practices/suggestions how to approach this? Maybe there is some way to impersonate a user? So i would create a bunch of test users via import of json data, then call the regular mutations to create content, impersonating one of the previously created test users.
Was this page helpful?