Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHilus committed May 17, 2017
2 parents 409bd5b + 489a677 commit 1450f0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Nitrolize/Types/Base/ViewerTypeBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ResolveFieldContext<object>, object> resolve = (context) =>
{
Expand All @@ -120,7 +123,7 @@ private void FindAndConvertPropertiesToLists()
var isAuthenticationRequired = list.GetAttribute<ListAttribute>().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);
}
Expand Down

0 comments on commit 1450f0a

Please # to comment.