Food-Static-Data / fake-api

instead of connecting to static data via groceristar-fetch plugin, or use a main our server - react developers can use axious in order to grab data from this server
https://grocerylists-fake-api.herokuapp.com/hello
1 stars 3 forks source link

replacing our common files #102

Open atherdon opened 5 years ago

atherdon commented 5 years ago

28

right now i want to get rid of these files:

when you'll be able to recreate them - we'll move this functionality into sd-wrapper and remove this files

atherdon commented 5 years ago

when we'll done it - it will close: https://github.com/GroceriStar/groceristar-fetch/issues/192

atherdon commented 5 years ago

for the last item at this list, can you also add to sd file with data from https://github.com/GroceriStar/groceristar-fetch/blob/master/src/projects/ChickenKyiv/chickenKyiv.js#L53-L63

atherdon commented 5 years ago

i think something is not clear. I see 3 files at sd, but their names are:

    'users',
    'grocery',
    'items'

So favorites is not finished

vadim9999 commented 5 years ago

Sorry, Now I added regenerated favorites in folder output in commit https://github.com/GroceriStar/sd/pull/91/commits/249256759c197e4f253f3d777d8be2eec47486b6

atherdon commented 5 years ago

No prob. looks awesome - so MenuGenerator is our last one, right?

vadim9999 commented 5 years ago

in 5-15 minutes I will push commit with MenuGenerator

atherdon commented 5 years ago

i have a question - where we get our data from? I mean what is the source, that give us data, that we later convert into a generated *.json file?

vadim9999 commented 5 years ago

the source is folder data. It get for e.g. src/data/Menu/menu gets object and now with changed path in last commit write in the same folder. It`s like rewriting

atherdon commented 5 years ago

hmm, will check it tomorrow deeply

atherdon commented 5 years ago

my goal with this task was to accomplish later this workflow: Ex: we need to generate a file userGrocery. We grab all groceries, all users, and randomly assign few groceries to users and save it to our file. Ex: we have list of ingredients and list of users. We want randomly generate a list of favorite ingredients for users that we has.

does our current functionality cover that cases?

vadim9999 commented 5 years ago

In https://github.com/GroceriStar/sd/pull/92

vadim9999 commented 5 years ago

Ex: we need to generate a file userGrocery. We grab all groceries, all users, and randomly assign few groceries to users and save it to our file. Ex: we have list of ingredients and list of users. We want randomly generate a list of favorite ingredients for users that we has.

Now it's just save data in file. I thought my task was to make function that will be writing data(object) in file

atherdon commented 5 years ago

yeah, you are right. our first task was to figure out how to save data to file. But I think now we need to move forward with it.

vadim9999 commented 5 years ago

Do we have function that grab all groceries, all users, and randomly assign few groceries to users and save it to our file.Or it needs to create it?

atherdon commented 5 years ago

i don't know - you can go to fetch plugin and create it as a new issue - because we may need it soon. fetch is packed with new developers, so we don't need to code it now :)

atherdon commented 5 years ago

replying to your concerns - as first step - we can generate some of files, with data structures, that we have at some methods from graphQL.js project

atherdon commented 5 years ago

check this video https://www.loom.com/share/dbf7eb508a834038aba6db6a40f32cd6