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
[HotChocolate.Types.UseFirstOrDefault] has been moved to [HotChocolate.Data.UseFirstOrDefault] in v11(rc0 and rc1), but the latter gives an exception: EXEC_LIST_TYPE_NOT_SUPPORTED
The type '...' is not supported as list value.
The [UseFirstOrDefault] attribute should automatically set the return type as instead of IEnumerable
To Reproduce
Steps to reproduce the behavior:
server side:
[HotChocolate.Data.UseFirstOrDefault]
[HotChocolate.Data.UseProjection]
[HotChocolate.Data.UseFiltering]
public IQueryable GetUserGroupById([Service] EherkenningDataContext context, Guid id) =>
context.UserGroups.Where(p => p.GroupId == id);
[HotChocolate.Types.UseFirstOrDefault] has been moved to [HotChocolate.Data.UseFirstOrDefault] in v11(rc0 and rc1), but the latter gives an exception: EXEC_LIST_TYPE_NOT_SUPPORTED
The type '...' is not supported as list value.
The [UseFirstOrDefault] attribute should automatically set the return type as instead of IEnumerable
To Reproduce
Steps to reproduce the behavior:
server side:
[HotChocolate.Data.UseFirstOrDefault]
[HotChocolate.Data.UseProjection]
[HotChocolate.Data.UseFiltering]
public IQueryable GetUserGroupById([Service] EherkenningDataContext context, Guid id) =>
context.UserGroups.Where(p => p.GroupId == id);
client side:
query {
userGroupById (id: "e003c8c1-3310-4a58-9baf-08d880a18656") {
groupId
}
}
same behaviour occurs with SingleOrDefault
Expected behavior
It should return a single result
Work around
provided by Pascal, add:
[GraphQLType(typeof(ObjectType))]
The text was updated successfully, but these errors were encountered: