Commit fbe334bf by lcx

获取字典方法调整

parent d636d27c
......@@ -63,14 +63,14 @@ public PerformanceQuery(GraphQLService service)
Field<ListGraphType<ReportPerformanceType>>("dictionary",
arguments: new QueryArguments(
new QueryArgument<IntGraphType>() { Name = QueryParams.reportId },
new QueryArgument<ListGraphType<StringGraphType>>() { Name = QueryParams.category }
new QueryArgument<ListGraphType<StringGraphType>>() { Name = QueryParams.sourceType }
),
resolve: context =>
{
int reportId = context.Arguments.ContainsKey(QueryParams.reportId)
? ConvertHelper.To<int>(context.Arguments[QueryParams.reportId])
: 15;
var parameters = GetDynamicParameters(context.Arguments, QueryParams.category);
var parameters = GetDynamicParameters(context.Arguments, QueryParams.sourceType);
return service.GetReportPerformance(reportId, parameters);
}
);
......
......@@ -19,6 +19,8 @@ public struct QueryParams
public const string reportId = "reportID";
public const string sourceType = "sourceType";
public const string category = "category";
public const string itemName = "itemName";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment