You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
marcofranssen
changed the title
Potential Bug or usage error
Potential Bug in mapping results back into structs or usage error
Oct 2, 2020
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 {
varqstruct { ... }
// ...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.
The text was updated successfully, but these errors were encountered: