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

install our fetch plugin #6

Open
3 of 7 tasks
atherdon opened this issue Jan 10, 2019 · 13 comments
Open
3 of 7 tasks

install our fetch plugin #6

atherdon opened this issue Jan 10, 2019 · 13 comments

Comments

@atherdon
Copy link
Member

atherdon commented Jan 10, 2019

  • read an article about plugin
  • sync latest changes from main repo
  • create/finish examples of static data for each of types that we have. Vadim will use it in order to compare results.
  • reply to our comments, advice at our questions
  • confirm that method from fetch, related to department works well

  • get some data, related to Grocery, Department, Ingredient (separately)
  • show me, how, by changing query - we'll get a different set of data from our static data as result
@nadaa
Copy link
Contributor

nadaa commented Jan 15, 2019

I will do this

@atherdon
Copy link
Member Author

ok, great! i hope it wouldn't be hard - at least documentation provides a lot of important data. Or feel free and buzz me with questions - i'm currently working at that plugin - so can reply quickly

@nadaa
Copy link
Contributor

nadaa commented Jan 15, 2019

I have tested the departments, got some data. The question is how to use this data, it doesn't include all the fields defined in the graphql types?

@atherdon
Copy link
Member Author

i cannot know it without seeing the code :) @nadaa
create PR, i'll merge and you'll point me the place that i can see

@nadaa
Copy link
Contributor

nadaa commented Jan 16, 2019

Please check, I just used a simple call to the getDepartment, I got (name, type) fields, my question is how to match the fields from the fetch to the graphql schemas?

@atherdon
Copy link
Member Author

ok, let's split this question.
For departments, you need these fields, right?

department_id: Int!
    name: String!
    desc:String
    created_at: Date
    updated_at: Date!

I'll update the fetch plugin, so data will be as expected

@atherdon
Copy link
Member Author

@vadim9999
Copy link
Contributor

vadim9999 commented Jan 16, 2019

@atherdon
In graphQL

type Grocery {
    grocery_id: Int!
    name: String!
    img: Binary!
    desc: String
    slug:Binary!
    created_at:Date
    updated_at:Date
    id_1:Int!
    favs: Binary!
}

In grocery.json

  {
    "departments": [
      "PROTEIN",
      "STARCH",
      "HEALTHY FATS",
      "VEGGIES",
      "BEVERAGES",
      "FRUITS",
      "OILS AND SEEDS",
      "SEASONINGS"
    ],
    "id": 2,
    "name": "Clean Fatiring",
    "img": false,
    "desc": false,
    "slug": false
  },

In grocery.json field "img" is boolean, but in graphQL it's Binary. I think it's throw an error.

@atherdon
Copy link
Member Author

@nadaa I install the last version of fetch plugin. Right now it has an only method, related to departments, but at next releases, we'll add other methods that you need too. I also created a selector.js file. it's a common approach that we have between our projects. it's just file where we connect fetch and grab data how we want it to grab. Please sync your fork with main repository

@atherdon
Copy link
Member Author

Nada, can you help us with this question: #6 (comment) ?

@nadaa
Copy link
Contributor

nadaa commented Jan 17, 2019

@atherdon , how to get the update of the fetch methods you updated?

@atherdon
Copy link
Member Author

@nadaa it's already updated at master at main repo

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