Skip to content

Commit 06f3bd4

Browse files
committed
add field resolvers to the demo
1 parent 00f7bb5 commit 06f3bd4

File tree

15 files changed

+7542
-2105
lines changed

15 files changed

+7542
-2105
lines changed

demo/pkg/subgraphs/employees/subgraph/generated/generated.go

Lines changed: 29 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/pkg/subgraphs/projects/generated/mapping.json

Lines changed: 295 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,44 @@
567567
"original": "priorityMatrix",
568568
"mapped": "priority_matrix",
569569
"argumentMappings": []
570+
},
571+
{
572+
"original": "filteredTasks",
573+
"mapped": "filtered_tasks",
574+
"argumentMappings": [
575+
{
576+
"original": "status",
577+
"mapped": "status"
578+
},
579+
{
580+
"original": "priority",
581+
"mapped": "priority"
582+
},
583+
{
584+
"original": "limit",
585+
"mapped": "limit"
586+
}
587+
]
588+
},
589+
{
590+
"original": "completionRate",
591+
"mapped": "completion_rate",
592+
"argumentMappings": [
593+
{
594+
"original": "includeSubtasks",
595+
"mapped": "include_subtasks"
596+
}
597+
]
598+
},
599+
{
600+
"original": "estimatedDaysRemaining",
601+
"mapped": "estimated_days_remaining",
602+
"argumentMappings": [
603+
{
604+
"original": "fromDate",
605+
"mapped": "from_date"
606+
}
607+
]
570608
}
571609
]
572610
},
@@ -627,6 +665,26 @@
627665
"original": "reviewers",
628666
"mapped": "reviewers",
629667
"argumentMappings": []
668+
},
669+
{
670+
"original": "isAtRisk",
671+
"mapped": "is_at_risk",
672+
"argumentMappings": [
673+
{
674+
"original": "threshold",
675+
"mapped": "threshold"
676+
}
677+
]
678+
},
679+
{
680+
"original": "daysUntilDue",
681+
"mapped": "days_until_due",
682+
"argumentMappings": [
683+
{
684+
"original": "fromDate",
685+
"mapped": "from_date"
686+
}
687+
]
630688
}
631689
]
632690
},
@@ -717,6 +775,26 @@
717775
"original": "reviewerIds",
718776
"mapped": "reviewer_ids",
719777
"argumentMappings": []
778+
},
779+
{
780+
"original": "isBlocked",
781+
"mapped": "is_blocked",
782+
"argumentMappings": [
783+
{
784+
"original": "checkDependencies",
785+
"mapped": "check_dependencies"
786+
}
787+
]
788+
},
789+
{
790+
"original": "totalEffort",
791+
"mapped": "total_effort",
792+
"argumentMappings": [
793+
{
794+
"original": "includeSubtasks",
795+
"mapped": "include_subtasks"
796+
}
797+
]
720798
}
721799
]
722800
},
@@ -797,6 +875,34 @@
797875
"original": "projectHistory",
798876
"mapped": "project_history",
799877
"argumentMappings": []
878+
},
879+
{
880+
"original": "currentWorkload",
881+
"mapped": "current_workload",
882+
"argumentMappings": [
883+
{
884+
"original": "includeCompleted",
885+
"mapped": "include_completed"
886+
},
887+
{
888+
"original": "projectId",
889+
"mapped": "project_id"
890+
}
891+
]
892+
},
893+
{
894+
"original": "averageTaskCompletionDays",
895+
"mapped": "average_task_completion_days",
896+
"argumentMappings": [
897+
{
898+
"original": "projectId",
899+
"mapped": "project_id"
900+
},
901+
{
902+
"original": "priority",
903+
"mapped": "priority"
904+
}
905+
]
800906
}
801907
]
802908
},
@@ -935,5 +1041,194 @@
9351041
}
9361042
]
9371043
}
1044+
],
1045+
"resolveMappings": [
1046+
{
1047+
"type": "LOOKUP_TYPE_RESOLVE",
1048+
"lookupMapping": {
1049+
"type": "Project",
1050+
"fieldMapping": {
1051+
"original": "filteredTasks",
1052+
"mapped": "filtered_tasks",
1053+
"argumentMappings": [
1054+
{
1055+
"original": "status",
1056+
"mapped": "status"
1057+
},
1058+
{
1059+
"original": "priority",
1060+
"mapped": "priority"
1061+
},
1062+
{
1063+
"original": "limit",
1064+
"mapped": "limit"
1065+
}
1066+
]
1067+
}
1068+
},
1069+
"rpc": "ResolveProjectFilteredTasks",
1070+
"request": "ResolveProjectFilteredTasksRequest",
1071+
"response": "ResolveProjectFilteredTasksResponse"
1072+
},
1073+
{
1074+
"type": "LOOKUP_TYPE_RESOLVE",
1075+
"lookupMapping": {
1076+
"type": "Project",
1077+
"fieldMapping": {
1078+
"original": "completionRate",
1079+
"mapped": "completion_rate",
1080+
"argumentMappings": [
1081+
{
1082+
"original": "includeSubtasks",
1083+
"mapped": "include_subtasks"
1084+
}
1085+
]
1086+
}
1087+
},
1088+
"rpc": "ResolveProjectCompletionRate",
1089+
"request": "ResolveProjectCompletionRateRequest",
1090+
"response": "ResolveProjectCompletionRateResponse"
1091+
},
1092+
{
1093+
"type": "LOOKUP_TYPE_RESOLVE",
1094+
"lookupMapping": {
1095+
"type": "Project",
1096+
"fieldMapping": {
1097+
"original": "estimatedDaysRemaining",
1098+
"mapped": "estimated_days_remaining",
1099+
"argumentMappings": [
1100+
{
1101+
"original": "fromDate",
1102+
"mapped": "from_date"
1103+
}
1104+
]
1105+
}
1106+
},
1107+
"rpc": "ResolveProjectEstimatedDaysRemaining",
1108+
"request": "ResolveProjectEstimatedDaysRemainingRequest",
1109+
"response": "ResolveProjectEstimatedDaysRemainingResponse"
1110+
},
1111+
{
1112+
"type": "LOOKUP_TYPE_RESOLVE",
1113+
"lookupMapping": {
1114+
"type": "Milestone",
1115+
"fieldMapping": {
1116+
"original": "isAtRisk",
1117+
"mapped": "is_at_risk",
1118+
"argumentMappings": [
1119+
{
1120+
"original": "threshold",
1121+
"mapped": "threshold"
1122+
}
1123+
]
1124+
}
1125+
},
1126+
"rpc": "ResolveMilestoneIsAtRisk",
1127+
"request": "ResolveMilestoneIsAtRiskRequest",
1128+
"response": "ResolveMilestoneIsAtRiskResponse"
1129+
},
1130+
{
1131+
"type": "LOOKUP_TYPE_RESOLVE",
1132+
"lookupMapping": {
1133+
"type": "Milestone",
1134+
"fieldMapping": {
1135+
"original": "daysUntilDue",
1136+
"mapped": "days_until_due",
1137+
"argumentMappings": [
1138+
{
1139+
"original": "fromDate",
1140+
"mapped": "from_date"
1141+
}
1142+
]
1143+
}
1144+
},
1145+
"rpc": "ResolveMilestoneDaysUntilDue",
1146+
"request": "ResolveMilestoneDaysUntilDueRequest",
1147+
"response": "ResolveMilestoneDaysUntilDueResponse"
1148+
},
1149+
{
1150+
"type": "LOOKUP_TYPE_RESOLVE",
1151+
"lookupMapping": {
1152+
"type": "Task",
1153+
"fieldMapping": {
1154+
"original": "isBlocked",
1155+
"mapped": "is_blocked",
1156+
"argumentMappings": [
1157+
{
1158+
"original": "checkDependencies",
1159+
"mapped": "check_dependencies"
1160+
}
1161+
]
1162+
}
1163+
},
1164+
"rpc": "ResolveTaskIsBlocked",
1165+
"request": "ResolveTaskIsBlockedRequest",
1166+
"response": "ResolveTaskIsBlockedResponse"
1167+
},
1168+
{
1169+
"type": "LOOKUP_TYPE_RESOLVE",
1170+
"lookupMapping": {
1171+
"type": "Task",
1172+
"fieldMapping": {
1173+
"original": "totalEffort",
1174+
"mapped": "total_effort",
1175+
"argumentMappings": [
1176+
{
1177+
"original": "includeSubtasks",
1178+
"mapped": "include_subtasks"
1179+
}
1180+
]
1181+
}
1182+
},
1183+
"rpc": "ResolveTaskTotalEffort",
1184+
"request": "ResolveTaskTotalEffortRequest",
1185+
"response": "ResolveTaskTotalEffortResponse"
1186+
},
1187+
{
1188+
"type": "LOOKUP_TYPE_RESOLVE",
1189+
"lookupMapping": {
1190+
"type": "Employee",
1191+
"fieldMapping": {
1192+
"original": "currentWorkload",
1193+
"mapped": "current_workload",
1194+
"argumentMappings": [
1195+
{
1196+
"original": "includeCompleted",
1197+
"mapped": "include_completed"
1198+
},
1199+
{
1200+
"original": "projectId",
1201+
"mapped": "project_id"
1202+
}
1203+
]
1204+
}
1205+
},
1206+
"rpc": "ResolveEmployeeCurrentWorkload",
1207+
"request": "ResolveEmployeeCurrentWorkloadRequest",
1208+
"response": "ResolveEmployeeCurrentWorkloadResponse"
1209+
},
1210+
{
1211+
"type": "LOOKUP_TYPE_RESOLVE",
1212+
"lookupMapping": {
1213+
"type": "Employee",
1214+
"fieldMapping": {
1215+
"original": "averageTaskCompletionDays",
1216+
"mapped": "average_task_completion_days",
1217+
"argumentMappings": [
1218+
{
1219+
"original": "projectId",
1220+
"mapped": "project_id"
1221+
},
1222+
{
1223+
"original": "priority",
1224+
"mapped": "priority"
1225+
}
1226+
]
1227+
}
1228+
},
1229+
"rpc": "ResolveEmployeeAverageTaskCompletionDays",
1230+
"request": "ResolveEmployeeAverageTaskCompletionDaysRequest",
1231+
"response": "ResolveEmployeeAverageTaskCompletionDaysResponse"
1232+
}
9381233
]
9391234
}

0 commit comments

Comments
 (0)