diff --git a/src/Nitrolize/Types/Base/ViewerTypeBase.cs b/src/Nitrolize/Types/Base/ViewerTypeBase.cs index a8feab9..4748e2e 100644 --- a/src/Nitrolize/Types/Base/ViewerTypeBase.cs +++ b/src/Nitrolize/Types/Base/ViewerTypeBase.cs @@ -109,6 +109,9 @@ private void FindAndConvertPropertiesToLists() var entityType = list.PropertyType.GetGenericArguments()[0].MapToGraphType(); var listGraphType = typeof(ListGraphType<>).MakeGenericType(entityType); + // get arguments from attributes + var arguments = new QueryArguments(list.GetQueryArguments()); + // construct resolving method Func, object> resolve = (context) => { @@ -120,7 +123,7 @@ private void FindAndConvertPropertiesToLists() var isAuthenticationRequired = list.GetAttribute().IsAuthenticationRequired; var requiredRoles = list.GetRequiredRoles(); - var graphQLField = this.Field(listGraphType, list.Name.ToFirstLower(), null, new QueryArguments(), resolve); + var graphQLField = this.Field(listGraphType, list.Name.ToFirstLower(), null, arguments, resolve); graphQLField.RequiresRoles(requiredRoles); graphQLField.RequiresAuthentication(isAuthenticationRequired); }