Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new methods at fetch plugin, that will fit to current server requirements (prev. static data) #18

Closed
13 of 14 tasks
atherdon opened this issue Jan 16, 2019 · 13 comments
Assignees

Comments

@atherdon
Copy link
Member

atherdon commented Jan 16, 2019

#6 (comment)

and we need to have that data for all types, that we specified here: https://github.com/GroceriStar/graphql-server/tree/master/src/typeDefs


create new methods

Departments

  • Moved data to selector.js here?
  • Completed and tested here with approval from Nada

Grocery

Schema
Static Data that was tested at graphql server

  • Was Grocery Methods published at fetch plugin?
  • Did we update package at this repo?
  • Moved data to selector.js here?
  • Completed and tested here with approval from Nada

Ingredients

Schema
don't have file Static Data that was tested at graphql server

  • Was Ingredient Methods published at fetch plugin?
  • Did we update package at this repo?
  • Moved data to selector.js here?
  • Completed and tested here with approval from Nada

users

Schema
Static Data that was tested at graphql server

  • Was users Methods published at fetch plugin?
  • Did we update package at this repo?
  • Moved data to selector.js here?
  • Completed and tested here with approval from Nada

next types will explain later

@atherdon
Copy link
Member Author

@atherdon atherdon changed the title static data Create new methods at fetch plugin, that will fit to current server requirements (prev. static data) Jan 17, 2019
@atherdon
Copy link
Member Author

@nadaa During our last conversation with Vadim, he raised a very important question.
I'll put it here, so we can discuss it.

We have an id fields at our types(department_id: Int!)
What id should return to you?

At your example, we have an id field like plain numbers(1,2,3 ...) but at mongDB our id will have autogenerated keys(like 43c5b78c-19ca-11e9-ba92-1de8759e63a0). I think we should keep key version, because it'll emulate work with a real database...

while it's not solved - we created 2 methods(stored at selectors.js) one will return int, second will return custom key.

@nadaa
Copy link
Contributor

nadaa commented Jan 17, 2019

There is a scalar type in graphql called ID, maybe it will fit the mongodb generated id. I will check that.
Also, we need to make sure there is a relationship between the data (ex. department_id value shared between departments and ingredients data)

@atherdon
Copy link
Member Author

atherdon commented Jan 17, 2019

we need to make sure there is a relationship between the data (ex. department_id value shared between departments and ingredients data)

it'll done at next stages. right now our goal1 is to replace all static files at data folder. @nadaa please update content at files that isset, but empty. it'll save time to Vadim

@nadaa
Copy link
Contributor

nadaa commented Jan 17, 2019

Ok, I will update the data files

@atherdon
Copy link
Member Author

So, what methods we should create next?
I mean maybe we should dig into basic GS and grab and adjust some details about system - Grocery Lists - Departments - Ingredients? Like we did it at the showcase project?

please advice, Vadim

@atherdon
Copy link
Member Author

atherdon commented Jan 25, 2019

@vadim9999
Copy link
Contributor

links of old and new versions are identical

@atherdon
Copy link
Member Author

updated, sorry

@atherdon
Copy link
Member Author

Vadim, you changes at fetch-plugin was published on npm, and I update it at this repo as well.

@vadim9999
Copy link
Contributor

ok

@vadim9999
Copy link
Contributor

@atherdon
Copy link
Member Author

atherdon commented Jan 25, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants