-
Notifications
You must be signed in to change notification settings - Fork 50
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
Named model sample in Writing Queries page is incorrect #196
Comments
Okay I got it. Using the following for RepositoryModel (I added TotalCount):
The following query works:
I am constructing an IssueConnection twice and if there is a way to use just one IssueConnection for both then I hope someone else can improve that. The important part of this version (compared to what is in the original post) is that IssueConnection has a "Nodes" that is the list of issues. |
👋 Hey Friends, this issue has been automatically marked as |
The sample at the bottom of Writing Queries is wrong. The syntax for creating a named object is different from anonymous objects. The following is a complete sample that works except I don't know how to get the issues.
A minor issue is that the Repository method arguments are reversed.
The important part that is incorrect is:
The problem with the issues is that Repository.Issues is an IssueConnection, right? I get the impression that the definition of issues has been (appropriately) made more complicated after the article was written.
Also, I avoid using var but fans of var can change that code if they feel it is necessary. I don't think it will make a difference here.
The text was updated successfully, but these errors were encountered: