Hey @vincentz - you will need to submit your data to the database using a mutation. This part of Redwood is a stumbling block for many, so please feel free to come back with any follow up as you work through it. If you generate the SDL/Services on the Model then you will get a lot of the mutations you need. However, depending on the complexity of your models, you may have to customize them to set up relationships or other things. If you do customize them, be careful not to regen the sdl/service which could overwrite your changes.
@arimendelow gave a nice, brief summary of mutating data on the DB which is:
if you want a mutation for only that field, what you’ll need to do is as follows:
on the api side:
- define the mutation type to accept whatever parameters are needed to update that field, ie the post id and field value
- create the corresponding mutation resolver in the model’s service
on the web side:
- create a form that uses this mutation
reread chapter 3 for more detailed examples and information: Saving Data | RedwoodJS Docs
To add to this, Chapter 6 - Adding Comments to the Schema goes through building SDL/Services manually.