GroceriStar / groceristar-fetch

json arrays for Food Tech projects
https://groceristar.github.io/groceristar-fetch/
GNU General Public License v3.0
8 stars 18 forks source link

"users" big object #211

Open atherdon opened 5 years ago

atherdon commented 5 years ago

60

for the first time - we can create it just for GS-loopback case only. main reason to have this method related to creation a fake user that have some relations with our data. it's using in GS-Loopback, CK, gs-graphql, etc. I don't want to assign this task to Vadim, because he is overwhelmed with other projects

atherdon commented 5 years ago

Our goal will be to generate an object, with structure like this: https://github.com/GroceriStar/sd/blob/master/src/data/Grocery/example/grocery-with-user-relations.json

it's long and complex task, so please ask your questions. I have a lot of things to share, but want to have a discussion about how we'll do it. @azaidi4

atherdon commented 5 years ago

we'll store methods here: https://github.com/GroceriStar/groceristar-fetch/blob/master/src/projects/GS-Loopback/loopback.js And yeah - we can upgrade get there too.

https://github.com/GroceriStar/sd/issues/76

atherdon commented 5 years ago

here some examples, of methods that were created by Vadim

https://github.com/GroceriStar/groceristar-fetch/blob/master/src/projects/GroceriStar/groceristar.js#L56-L177

https://github.com/GroceriStar/groceristar-fetch/blob/master/src/projects/GraphQL/graphQL.js#L97-L208

https://github.com/GroceriStar/groceristar-fetch/blob/master/src/projects/ChickenKyiv/chickenKyiv.js#L28-L49

azaidi4 commented 5 years ago

I have a few questions.

atherdon commented 5 years ago

we'll generate an id by using uuid library yes, please create one method that will return this complex object. Is everything else is clear for you?

azaidi4 commented 5 years ago

And yeah - we can upgrade get there too.

Regarding this, the tests in loopback.test.js use the get methods, should I comment all the tests out or delete them entirely

atherdon commented 5 years ago

if you create a separated github issue, where you explain what you did and why - yes, you can comment it. Just want to keep track on our changes

atherdon commented 5 years ago

Ok, merged. Just curious why you didn't ask me about what exactly difference between arrays of ids is. I mean they are just id - i.e. numbers, but the origin is different of them is different

azaidi4 commented 5 years ago

Since this was a mockup I thought it would not matter. However you are right. Thank you for the information!

atherdon commented 5 years ago

it 100% doesn't matter for our current state - but for future we need to know that hide is related to ids from departments and purchased is ids of ingredients/items. For the current version, it's ingredients, after upgrade, it will be items. And items is a table between grocery lists and ingredients.

I think for now this task is, done. But maybe we should extend it and make more real. Not sure