Monday 11 December 2017

Objection and Apis

So, I'm getting use to objection+knex and I gotta say that after an initial phase where I had to bootstrap and understand the mechanisms and how it works, it seems very nice, and I want to go deeper.I have a model Person that describes a person with a first_name, last_name and a *bio. I have created from scratch the basic CRUD methods to operate on the Person model, using the knex and objection additional methods (like findById).But, at this point I would like to try 2 different thigs:Is it necessary to create these APIs from scratch? Can I automate the process? I have found that there are an objection-rest and objection-graphql modules that maybe suit my needs. Has anyone tried them? Do they work?How do I implement search? For instance, I want to retrive instances of Person with the first_name 'John', or even better, partial text matching?JSON-API. Even though the specitfication seems great, I still haven't understood how I can implement it.I am using postgres, express and knex+objection.

Submitted December 11, 2017 at 09:44AM by honestserpent

No comments:

Post a Comment