Open marcofranssen opened 3 years ago
@dmitshur do you have any clue? Or any lead where to continue.
You're reusing the q
variable between iterations. That means for the second page and onwards, it'll be non-zero as it contains data from the last page. I'm not sure how well supported that is (and it's a TODO to improve that).
As a first step, I'd suggest trying to move the variable into the for loop so its value is always zero before making the query:
for {
var q struct { ... }
// ...
err := c.Query(&q, variables)
If that fixes the problem, then we'll know this is the cause.
When I run following query manually in my graphql playground all works as expected.
This query is what I took from my logs, when running my code.
However if I run this from the code for a whole bunch of records my structs are note populated with the values I see from the manual query result.
So for some records e.g. my
identity.User.Organization.Name
is empty while for some other records it populates just fine.See below the go structs
And this is the code to run the request.
Why are some of these organization fields empty in some of the records while others populate just fine? Yes I did check by running the query manually to see if the data combing back from the api is there.