Hi Michael, Just to let you know that selection on the model property does't work anymore. E.g. I followed this exact tutorial and this bit doesn't work anymore: enrollments(where: { courseId: 1 })
query { students(where: { lastName: "Bar" }) { firstMidName lastName enrollments(where: { courseId: 1 }) { courseId course { title } } } }
I am using the latest of asp.net core and the latest of Hot Chocolate as of today:
<PackageReference Include="HotChocolate.AspNetCore" Version="10.4.3" /> <PackageReference Include="HotChocolate.AspNetCore.Playground" Version="10.4.3" /> <PackageReference Include="HotChocolate.Types.Filters" Version="10.4.3" /> <PackageReference Include="HotChocolate.Types.Selections" Version="10.4.3" /> <PackageReference Include="HotChocolate.Types.Sorting" Version="10.4.3" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="3.1.4" />
The playground shows error and doesn't allow to execute the enrollment where clause:
"unknown arguments on field enrollments"
TA
That could be because of the paiging. The request which is needed in case of paging enabled (nodes added) -
query { students(where: { OR: [{ lastName: "Bar" }, { lastName: "Baz" }] }) { nodes { firstMidName lastName enrollmentDate enrollments (where: { courseId: 1 }) { grade course { title } } } } }
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Michael,
Just to let you know that selection on the model property does't work anymore. E.g. I followed this exact tutorial and this bit doesn't work anymore: enrollments(where: { courseId: 1 })
query {
students(where: { lastName: "Bar" }) {
firstMidName
lastName
enrollments(where: { courseId: 1 }) {
courseId
course {
title
}
}
}
}
I am using the latest of asp.net core and the latest of Hot Chocolate as of today:
The playground shows error and doesn't allow to execute the enrollment where clause:
"unknown arguments on field enrollments"
TA
That could be because of the paiging. The request which is needed in case of paging enabled (nodes added) -
query {
students(where: { OR: [{ lastName: "Bar" }, { lastName: "Baz" }] }) {
nodes {
firstMidName
lastName
enrollmentDate
enrollments (where: { courseId: 1 }) {
grade
course {
title
}
}
}
}
}