news-catalyst / reproducible-tinynews-content-api

A webiny installation complete with scripted content models and graphql
0 stars 0 forks source link

Script initial data population #74

Closed jacqui closed 3 years ago

jacqui commented 3 years ago

How best to do this: I think using webiny's commodo would work best... maybe.

Example from https://docs.webiny.com/docs/api-development/commodo/crash-course/:

const dog = new Dog();
dog.populate({ name: "Rex", age: 4, willScratchYou: false, drools: 1 });
jacqui commented 3 years ago

Actually, after thinking about it, I think scripting this data population via the graphql API is the best approach: