example-invoice icon indicating copy to clipboard operation
example-invoice copied to clipboard

Seed.js not working properly

Open matthalvorson33 opened this issue 4 years ago • 2 comments

The Invoice service relies on "context.currentUser?.id" to create an Invoice, which doesn't work running "yarn rw db seed"

Seems tricky to establish user context within the seed.js file, so I was trying to seed a user first and providing that but couldn't get it to work.

Still learning the ins and outs of Prisma and Redwood and don't totally understand the input types it asks for while creating the Invoice while providing a User but it seems possible

matthalvorson33 avatar Feb 10 '21 21:02 matthalvorson33

Hi @matthalvorson33! I'm not sure if the Seed step is even needed anymore. See https://github.com/redwoodjs/example-invoice/issues/35

@peterp is the original author here. Peter, could you help clarify? Also see relate PR https://github.com/redwoodjs/example-invoice/pull/50

thedavidprice avatar Feb 12 '21 14:02 thedavidprice

Thanks for pointing me there, I hadn't seen that yet. Appreciate the help :)

matthalvorson33 avatar Feb 12 '21 19:02 matthalvorson33