We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
query:
{ repositoryOwner(login: "_dnxv__") { ... on ProfileOwner { pinnedItemsRemaining itemShowcase { hasPinnedItems } } } }
result:
{ "data": { "repositoryOwner": null } }
but the variable query in golang is a struct, so how to check if it's null? any workaround or tricks?
query
The text was updated successfully, but these errors were encountered:
You can use a pointer to a struct, and check if the pointer value is nil. For example:
nil
var q struct { RepositoryOwner *struct { ProfileOwner struct { PinnedItemsRemaining int // ... } `graphql:"... on ProfileOwner"` } `graphql:"repositoryOwner(login: \"_dnxv__\")"` } // call client.Query(...) if q.RepositoryOwner == nil { // handle this case } // ...
Sorry, something went wrong.
No branches or pull requests
query:
result:
but the variable
query
in golang is a struct, so how to check if it's null? any workaround or tricks?The text was updated successfully, but these errors were encountered: