Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
fbe334bf
Commit
fbe334bf
authored
Dec 31, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取字典方法调整
parent
d636d27c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
performance/Performance.Api/GraphQLSchema/PerformanceQuery.cs
+2
-2
performance/Performance.Api/GraphQLSchema/QueryParams.cs
+2
-0
No files found.
performance/Performance.Api/GraphQLSchema/PerformanceQuery.cs
View file @
fbe334bf
...
...
@@ -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
);
}
);
...
...
performance/Performance.Api/GraphQLSchema/QueryParams.cs
View file @
fbe334bf
...
...
@@ -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"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment