Closed gmineropfdrive closed 2 years ago
This might be due to performing too many transformations in resolvers, which are limited to 1k iterations in a #foreach
loop. Are you using @auth
or selective sync on your API with more than 1k records in a single fetch? Both of those mechanisms need to apply transformation logic in the resolver before returning results. You could apply a limit of 1k records to see if that alleviates the problem.
@undefobj atm, i dont have more than 500 in total, my queries have a limit of 5 records per loop per table. No selective sync and auth atm is set to public. (iterating over 4 tables atm)
@undefobj atm, i dont have more than 500 in total, my queries have a limit of 5 records per loop per table. No selective sync and auth atm is set to public. (iterating over 4 tables atm)
What do you mean iterating over 4 tables? If it's not hitting the max size limit and not hitting the iterations limit, then that seems odd as only those params will cause this limit check in the service. Can you give an example of your schema and query triggering this?
Schema:
type SelectedSchemaSync @model @auth(rules: [{allow: public}]) {
id: ID!
name: String!
fields: String
orgId: String
}
type SyncLog @model @auth(rules: [{allow: public}]) {
id: ID!
eventType: String
reason: String
status: String
message: String
orgId: String
sfId: String
}
type SmWorkOrderc @model @auth(rules: [{allow: public}]) {
id: ID!
External_Id: ID
Sobject: String
Orgid: String!
SfId: String!
OwnerId: String
IsDeleted: String
Name: String
RecordTypeId: String
CreatedDate: String
CreatedById: String
LastModifiedDate: String
LastModifiedById: String
SystemModstamp: String
LastActivityDate: String
LastViewedDate: String
LastReferencedDate: String
AC_Capacity: String
ADS_Curtailment: String
Account: String
Action_Code2: String
Action_Code: String
Actual_Start_Date: String
All_Log_Note: String
Alternative_Work_Schedule: String
Approval_Queue: String
Approved_Date_Time: String
Approved_Variance: String
Asset_Default_Planner: String
Asset_Group: String
Asset_ID_Prefix: String
Asset_ID_Text: String
Asset_Location: String
Asset_Project_Name: String
Asset_Tag_Customer_Number: String
Assigned_To: String
Assigned_User_Active: String
Assigned_User_Name_Text: String
Assigned_Vendor: String
Bill_to_EPC: String
Billable_Status: String
Billable: String
Billing_Review: String
Breaker_Control: String
Business_Unit_Override: String
Business_Unit: String
CAISO_Generation_Desk: String
CAISO_Metering: String
CMRVAWOC: String
CPR_First_Aid_AED_Required: String
Calculated_Downtime: String
Cap_Bank_Control: String
Capability_During_Outage_MW: String
Cause_Code2: String
Cause_Code: String
City: String
Claim_Close_Date: String
Claim_Description: String
Claim_Number: String
Claim_Status: String
Claim_Submission_Date: String
Class: String
Close_Date: String
Completed_Date_Time: String
Completed_Time_From_Email: String
Completion_Comments: String
Completion_Date: String
Completion_Notes: String
Completion_Variance: String
Contract_Curtailment_Limit_UOM: String
Contract_Curtailment_Limit: String
Contract_Term: String
Contract_requirements: String
Coordination_Email_Scheduled: String
Count: String
Created_Hrs: String
Created_by_Email_Service: String
Creator: String
Current_User_Work_Order: String
Curtailment_Control: String
CustomerAsset_ID: String
Customer_Asset_ID: String
Customer_PO_Requirement_Override: String
Customer_Purchase_Order_Number: String
Customer_Reference_Number: String
Days_Past_Scheduled_Completion: String
Days_to_Complete_WO: String
Delay_Code_Due_Date: String
Delay_Notes_History: String
Delay_Notes: String
Delay_SubType: String
Delay_Type: String
Dept: String
Description: String
Detailed_Comments: String
Downtime_hrs: String
Driveway_Coordinates: String
Due_Date_Day_of_Week: String
Due_Date: String
ELAM_WO: String
ET_Assigned_User: String
Eligible_Distribution_List: String
Email_Response: String
Employee_Phone_Number: String
Entitlement_Name: String
Entitlement_Term_Description: String
Entitlement_Term_Text: String
Entitlement_Term: String
Entitlement: String
Entity_Name: String
Equip_Description: String
Equipment_Sync_External_Id: String
Equipment: String
Event_Based_Entitlement_Email: String
Event_Duration: String
Event_End: String
Event_Month: String
Event_Start: String
Event_based_AWO: String
Excusable_Event_Type: String
Excusable_Event: String
Expense_Type: String
Expert_Diagnosis_Status: String
FBI: String
Failure_Class: String
Failure_Code2: String
Failure_Code: String
Field_Work_Completion_Date: String
Field_Work_Status: String
Fire_Dept_Phone: String
Fire_Dept: String
GL_Variable_1: String
GL_Variable_2: String
GL_Variable_3: String
GL_Variable_4: String
GWO: String
Gate_Combo_Codes: String
Geolocation__Latitude__s: String
Geolocation__Longitude__s: String
Geolocation: String
Hospital_Address: String
Hospital_Phone_number: String
ID_Description: String
ISO_Entity: String
Identified_By: String
Impact_System_Capacity: String
In_Progress_Time_From_Email: String
Initial_Est_Hours: String
Instructions: String
Insurance_Claim: String
Inter_Connection_Line: String
Interconnect: String
Inverter_Control: String
Invoice_Amount: String
Invoice: String
Is_EH_S: String
LOTO: String
Labor_Cost: String
Last_Modified_Date: String
Latest_Log_Note: String
Legacy_Name: String
Legacy_Work_Order_ID: String
Long_Problem_Description: String
Lost_Production: String
Lost_Revenue: String
MRVAWOC: String
Manufacturer: String
Material_Cost: String
Meter_Description: String
Meter_ID: String
Meter_UOM: String
Monthly_Report_Classification: String
NERC_Registered: String
NPFA_70_E_Required: String
Not_To_Exceed_Amount: String
Not_to_Exceed_Notes: String
Notes: String
Number_of_Flights_Required: String
Number_of_Techs: String
Number_of_Trucks_Required: String
OMS_Number: String
OMS_System: String
OMS_URL: String
OSHA_10_Required: String
Operational_Event_Sync_External_Id: String
Operational_Event: String
Operator: String
Operator_for_Sharing_Criteria: String
Other_Costs_Misc: String
Over_90_Days_Past_Scheduled_Completion: String
Owner_Name: String
Owner_Summary_Notes: String
PF_Coordination_Required: String
PF_External_Id: String
PM_Assigned_Contact_Email: String
PM_Group_Detail: String
PM_Group_Schedule: String
PM_Link: String
PM_Schedule: String
PO_Amount: String
PO_Required: String
Parent_Account: String
Parent_Source_Work_Order: String
Parent_Work_Order: String
Part_Ship_to_Name_Address: String
Part_Shipment_Details: String
Part_Shipping_Comments: String
Part_Shipping_Instructions: String
Part_Shipping_Method: String
Parts_Expense_Account: String
Parts_Supplies_GL_Account: String
Planner: String
PlantID: String
Plant_15_ID: String
Plant_18_ID: String
Plant_Available_Capacity: String
Plant_Derated_Capacity_kW: String
Plant_Description: String
Plant_EnergyPrice_MidPeak: String
Plant_Id: String
Plant_Impact: String
Plant_Name: String
Plant_Region: String
Plant_Sub_region: String
Plant_UUID: String
Plant: String
Pole_ID: String
Police_Phone: String
Portfolio_18_ID: String
Prevailing_Wage: String
Priority: String
QEW: String
Quickbooks_Job_Number: String
RE_Operator_Grouping: String
RMA: String
ROC_Alert_Type_Non_OE: String
ROC_Coordination: String
Rapid_Response_Site: String
Ready_to_Invoice: String
Recloser_ID: String
Record_FW_Completion_Time: String
Record_WO_Completed_Date_Time: String
Record_WO_In_progress_Date_Time: String
Reliability_Coordinator: String
Report_Completion_Variance: String
Reporting_Segment: String
Requested_Completion_Date: String
RequesterEmail: String
Required_Part_Ship_Date: String
Reschedule_Reason: String
Resource_Assigned: String
Resource_ID: String
Revenue_Category: String
Reviewed: String
Roof_Access: String
SO_Billing_Status: String
SO_WO_Delta: String
S_N_New_Part: String
S_N_Old_Part: String
Safety_Flag: String
Safety_Request: String
Sales_Order_Created_Date: String
Sales_Order_Created: String
Salesforce_ID: String
Scheduled_Action1_Date: String
Scheduled_Action2_Date: String
Scheduled_Action3_Date: String
Scheduled_Action4_Date: String
Scheduled_Action5_Date: String
Scheduled_Completion_Date: String
Scheduled_Completion_Variance: String
Scheduled_Coordination: String
Scheduled_Date_Time: String
Scheduled_Onsite_Date: String
Scheduled_Start_Date: String
Scheduled_Time_From_Email: String
Scheduled_Variance: String
Scheduling_Coordinator_DA: String
Scheduling_Coordinator_RT: String
Scheduling_Coordinator: String
Selected_Email_Notification_OE_NonOE: String
Service_Location: String
Service_Region: String
Service_Type: String
Shared_WO_Number_Formula: String
Shared_WO_Number: String
Sheriff: String
Shipping_Rate: String
Site_Access: String
Site_Check_in_Procedures: String
Site_Documentation: String
Site_Email: String
Site_Instructions: String
Site_Name: String
Site_Navigation_Map: String
Site_Overview: String
Site_Phone: String
Site_Scheduling_Process: String
Site_Status: String
Site_Type: String
Source_Work_Order_External_ID: String
Spare_Part_Status: String
State_Province: String
StatusNumerical: String
Status_Num: String
Status: String
Street_Address: String
Sub_Class: String
Sub_Contractor_Cost: String
Sub_Type: String
Sub_contractor: String
Sync_Owner_Name: String
System_Overview: String
System_Size_kW_DC: String
TimeStamp: String
Total_Actual_Labor_Hours: String
Total_Actual_WO_Costs_Utiity: String
Total_Actual_Work_Order_Cost: String
Total_Actual_Work_Order_Costs: String
Total_Applicable_Tax: String
Total_Work_Order_Planned_Cost: String
Tower_Rescue_Required: String
Track_WA_Working: String
Tracker_Control: String
Travel_Hours: String
URL1: String
Update_WO_Tasks_from_Completed_WO: String
Utility_Account: String
VAR_Control: String
Vegetation_Height_in: String
Vendor_Email: String
Voltage_Control: String
WA_Scheduled_Earliest_Stop_Time: String
WO_Approved_Date_Time: String
WO_Completed_Date_Time: String
WO_Created_Date_Time: String
WO_Created_in_Last_Hour: String
WO_Due_Date: String
WO_In_Progress_Date_Time: String
WO_In_Progress_Variance: String
WO_In_Progress_Working_Not_Travelling: String
WO_Ready_To_Schedule_Date_Time: String
WO_Ready_to_Invoice: String
WO_Response_Time_Travelling_Time_track: String
WO_Scheduled_Date_Time: String
WO_Status: String
WO_Type: String
WO_User_Integer1: String
WO_User_Number1: String
WO_User_Picklist_1: String
WO_User_Text_1: String
Waiting_Approval_Message: String
Warranty_Claim: String
Warranty_Claim_yn: String
Warranty_Type: String
WorkOrder_Operator: String
Work_Order_18: String
Work_Order_Created_From_OE: String
Work_Order_Field_Work_Compl_Variance: String
Work_Order_Integration_Response: String
Work_Order_Record_Type: String
Work_Requester: String
Zip_Postal_Code: String
Field_Work_Tasks_Open: String
Qty_of_Planned_Parts: String
Reporting_Tasks_Open: String
Total_Actual_DT_Labor_Hours: String
Total_Actual_Labor_Cost: String
Total_Actual_OT_Labor_Hours: String
Total_Actual_Part_Cost: String
Total_Actual_Reg_Labor_Hours: String
Total_Actual_WO_Misc_Costs: String
Total_Labor_Cost: String
Total_Labor_Hours_Utility: String
Total_Planned_Labor_Cost: String
Total_Planned_Labor_Hours: String
Total_Planned_Part_Cost: String
Total_Planned_WO_Misc_Cost: String
Total_Reporting_Tasks: String
Total_WO_Misc_Costs: String
WO_Tasks_Performed: String
}
type SmUserc @model @auth(rules: [{allow: public}]) {
id: ID!
Sobject: String
Orgid: String
SfId: String
OwnerId: String
IsDeleted: String
Name: String
CreatedDate: String
CreatedById: String
LastModifiedDate: String
LastModifiedById: String
SystemModstamp: String
LastActivityDate: String
LastViewedDate: String
LastReferencedDate: String
AboutMe: String
IsActive: String
Address: String
ReceivesAdminInfoEmails: String
Alias: String
ForecastEnabled: String
AutoClockOut: String
BannerPhotoId: String
CallCenterId: String
DigestFrequency: String
CompanyName: String
ContactId: String
DefaultGroupNotificationFrequency: String
DelegatedApproverId: String
Department: String
Division: String
EmailEncodingKey: String
SenderEmail: String
SenderName: String
Signature: String
EndDay: String
Extension: String
Fax: String
Federation_Id: String
Filter_Item_List_Info: String
Filter_Logic_Info: String
Filter_Sql_Where: String
IsProfilePhotoActive: String
WorkspaceId: String
IndividualId: String
ReceivesInfoEmails: String
UserSubtype: String
IsSystemControlled: String
Labor_Rate_Doubletime: String
Labor_Rate_Overtime: String
Labor_Rate_Regular: String
LanguageLocaleKey: String
LocaleSidKey: String
ManagerId: String
MobilePhone: String
CommunityNickname: String
OutOfOfficeMessage: String
PasswordResetAttempt: String
PasswordResetLockoutDate: String
Paycom_Employee_Number: String
PF_External_Id: String
Phone: String
ProfileId: String
Receive_Entitlement_Task_Emails: String
Regular_Hours_Per_Day: String
UserRoleId: String
FederationIdentifier: String
IsExtIndicatorVisible: String
StartDay: String
StayInTouchNote: String
StayInTouchSignature: String
StayInTouchSubject: String
Time_Sheet_Approver_1: String
TimeZoneSidKey: String
Title: String
MediumBannerPhotoUrl: String
SmallBannerPhotoUrl: String
MediumPhotoUrl: String
Username: String
}
type SmAssetTagc @model @auth(rules: [{allow: public}]) {
id: ID!
Sobject: String
Orgid: String
SfId: String
OwnerId: String
IsDeleted: String
Name: String
RecordTypeId: String
CreatedDate: String
CreatedById: String
LastModifiedDate: String
LastModifiedById: String
SystemModstamp: String
LastActivityDate: String
LastViewedDate: String
LastReferencedDate: String
AC_Capacity: String
AC_UOM: String
Account: String
Account_Name: String
ADS_Curtailment: String
Annual_Contract_Energy_kWh: String
Annual_PPA_Curtailment_Limit: String
Asset_Class: String
Asset_Group: String
Asset_ID_Prefix: String
Asset_ID_Prefix_Set: String
Asset_in_PI: String
Asset_Number: String
Asset_Priority: String
Asset_SubClass: String
Asset_Tag_Image: String
Asset_Tag_Image_URL: String
AssetRecordType: String
Asset_UUID: String
AT18: String
Available_Capacity: String
Part_Bin_Location: String
blankfield: String
Breaker_Control: String
Business_Segment: String
Plant_Business_Segment: String
Cap_Bank_Control: String
CHECKED: String
City: String
Clipping_Limit: String
Coeff_A: String
Coeff_B: String
Coeff_C: String
Coeff_D: String
Commercial_Entity_account: String
Connection_Device: String
Continent: String
Contract_Curtailment_Limit: String
Contract_Curtailment_Limit_UOM: String
Coordinator_s_Information: String
Country: String
Covered_Equipment: String
CPR_First_Aid_AED_Required: String
Create_Summary_Assets: String
Curtailment_control: String
CustomerAsset_ID: String
Customer_Asset_ID: String
Customer_Asset_Name: String
Customer_has_Visibility: String
Data_Aquisition_System: String
Data_Communications_Flat_Line_Time_Delay: String
Data_Communications_FLine_Trigger_Value: String
DC_Capacity: String
DC_UOM: String
Default_Failure_Class: String
Default_Planner: String
Dept: String
Derated_Capacity: String
Description: String
Do_not_sync_to_Drive: String
Driveway_Coordinates: String
Energy_Contract_Anniversary_Date: String
Energy_Source: String
EnergyPrice_MidPeak: String
EnergyPrice_OffPeak: String
EnergyPrice_OnPeak: String
Engine: String
Entitlement_Term: String
Equipment_Count: String
Equipment_Location: String
ET_Assigned_user_Plant_Level: String
External_Asset_ID: String
External_ID_AT: String
External_Sys_ID: String
FBI: String
Fire_Dept: String
Fuel_Type: String
Geolocation: String
GL_Variable_1: String
GL_Variable_2: String
GL_Variable_3: String
GL_Variable_4: String
Gross_Vehicle_Weight: String
GWO: String
Hierarchy_Display: String
Hierarchy_Sort_Order: String
HolCo_18_ID: String
ID_Description: String
Image: String
Impedance: String
In_Service_Date: String
Interconnect: String
Interconnection_Line: String
Interconnection_Type: String
Inverter_Capacity: String
Inverter_Control: String
Inverter_forced_Outage_Time_Delay: String
Inverter_Forced_Outage_Trigger_Value: String
Inverter_Performance_Alert_Time_Delay: String
Inverter_Performance_Alert_Trigger_Value: String
Inverter_Qty: String
Is_not_in_Drive: String
ISO_Entity: String
CAISO_Generation_Desk: String
CAISO_Metering: String
KVA_Rating: String
Last_date_Verified: String
Latitude: String
Location_text: String
Longitude: String
LOTO: String
MA_LSTWK_O_M_Log: String
Manufacturer: String
Manufacturer_Data_Identifier: String
Manufacturer_Name: String
Mfg_Date: String
Mfg_Year: String
Model_Number: String
Model_Number_lk: String
Module_Degradation_Effective_Date: String
Module_Degradation_Rate: String
Monitored_by: String
Monitored_in_Drive: String
Nameplate_Data: String
Nation: String
NERC_Registered: String
Notes: String
NPFA_70_E_Required: String
Doors: String
Component_Part: String
Oil_Type: String
OMS_System: String
OMS_URL: String
Operator: String
Operator_formula: String
Operator_Plant_Count: String
OSHA_10_Required: String
Parent: String
Parent_Description: String
Parent_ID_Text: String
Part_Bucket: String
Part_Id: String
Parts_Supplies_GL_Account: String
Parts_Expense_Account: String
Plant: String
PF_External_Id: String
Plant_15_ID: String
Plant_18_ID: String
Plant_Contact: String
Plant_Description: String
Plant_forced_Outage_Time_Delay: String
Plant_Forced_Outage_Trigger_Value: String
PlantName: String
Plant_Performance_Alert_Time_Delay: String
Plant_Performance_Alert_Trigger_Value: String
Plant_UUID: String
PlantID: String
PO_Number: String
Pole_ID: String
Portfolio_15_ID: String
Portfolio_18_ID: String
Portfolio_Group: String
Power_Factors: String
PPA_Curtailment_Limit_UOM: String
Primary_Voltage: String
Product: String
Project_Number: String
Project_Owner: String
Project_Plant: String
Project_Plant_Description: String
Purchase_Date: String
QEW: String
QR_Code: String
Rapid_Response_Site: String
RE_LSTWK_OM_Log: String
RE_OM_Log_URL: String
Recloser_ID: String
Region: String
Reliability_Coordinator: String
Reporting_Asset_Group: String
Resource_ID: String
RTId: String
Salesforce_ID: String
Scheduling_Coordinator: String
Scheduling_Coordinator_DA: String
Scheduling_Coordinator_RT: String
Search: String
Secondary_Voltage: String
Serial_Number: String
Service_Location: String
Service_Region: String
Sheriff: String
Site_Controls: String
Site_Nameplate_Capacity_kW: String
Site_Status: String
State_Province: String
Status: String
Street: String
Sub_region: String
Time_Zone: String
Top_Level: String
Top_Level_Parent: String
Tower_Rescue_Required: String
Tracker_Capacity: String
Tracker_Control: String
Tracker_Qty: String
Transmission: String
Transmission_Operator: String
Transmission_Operator_RT: String
Type: String
Unique_Name: String
Utility_Account: String
uxid: String
VAR_control: String
VIN: String
Voltage_control: String
Warranty: String
Warranty_Expiration_Date: String
Warranty_Start_Date: String
Wheel_Drive: String
Y_intercept: String
Zip_Postal_Code: String
}
type SmWorkTaskc @model @auth(rules: [{allow: public}]) {
id: ID!
Sobject: String
Orgid: String
SfId: String
OwnerId: String
IsDeleted: String
Name: String
CreatedDate: String
CreatedById: String
LastModifiedDate: String
LastModifiedById: String
SystemModstamp: String
LastActivityDate: String
LastViewedDate: String
LastReferencedDate: String
People_Required: String
Account: String
Account_SFDC_ID: String
Actual_DT_Labor_Cost: String
Actual_DT_Labor_Hours: String
Actual_Labor_Hours: String
Actual_OT_Labor_Cost: String
Actual_OT_Labor_Hours: String
Actual_Reg_Labor_Cost: String
Actual_Reg_Labor_Hours: String
Asset_Description: String
Asset_ID: String
Asset_SFDC_ID: String
Resource_Assigned: String
Assignment: String
Assigned_User_Role: String
Assigned_Vendor: String
Confirm_or_Complete_Assignments: String
Craft: String
Create_Date: String
Created_Date_ReadOnly: String
Current_User_WO_Task: String
Customer_Project_Number: String
Days_to_Complete_WO_Task: String
Comments: String
Dispatch_Description: String
Due_Date_ReadOnly: String
Due_Date: String
Est_Hrs_at_Completion: String
Est_Hrs_to_Complete: String
External_Id: String
Grass_Height: String
Hours_per_MW: String
Include_In_Service_Report: String
InstructionsRT: String
Instructions: String
Labor_Cost: String
Legacy_Name: String
My_WO_Task: String
Percent_Complete: String
Performed: String
PF_External_Id: String
Planned_Hours: String
Planned_Hrs_Remaining: String
Planned_Labor_Cost: String
Previous_Percent_Complete: String
Priority: String
Report_Status: String
Schedule_Date: String
Step: String
Service_Region: String
Service_Report_Delivery_Date: String
Special_Tools_Required: String
Std_Task: String
Suggested_WO_Assignment_Duration: String
Suppress_Standard_Work_Task_Updates: String
Task_Due_Date: String
Task_steps_completed: String
Total_Actual_Labor_Cost: String
Total_Actual_Labor_Hours: String
Total_Steps: String
URL1: String
View_in_Dispatch_Console: String
WO_Asset_Description: String
WO_AssetID: String
WO_AssetID_Prefix: String
WO_Description: String
WO_Due_Date: String
WO_Status: String
WO_Task_Actual_Completion_Date: String
WO_Task_Actual_Start_Date: String
WO_Type: String
Work_Order: String
Work_Order_Assigned_User: String
Work_Order_Record_Type: String
WOT_User_Text_1: String
WOT_Asset_Subclass: String
WOT_User_Integer1: String
WOT_User_Number1: String
WOT_User_Picklist_1: String
WT_Completion_Date: String
}
type SmWorkAssignmentc @model @auth(rules: [{allow: public}]) {
id: ID!
Sobject: String
Orgid: String
SfId: String
OwnerId: String
IsDeleted: String
Name: String
RecordTypeId: String
CreatedDate: String
CreatedById: String
LastModifiedDate: String
LastModifiedById: String
SystemModstamp: String
LastActivityDate: String
LastViewedDate: String
LastReferencedDate: String
Account_Name: String
Account_SFDC_ID: String
IsAllDayEvent: String
Asset_SFDC_ID: String
AssetID: String
Assigned_User: String
Assignment_Due_Date: String
Assignment_Schedule_Date: String
Check_In_Map_Location: String
Check_Out_Map_Location: String
Check_In_Location: String
Check_In_Time: String
Check_Out_Location: String
Check_Out_Time: String
CHECKED: String
Completed: String
Current: String
Current_Assignment: String
Current_Hours_Accumulated: String
Flagged: String
Follow_Up_Work_Description: String
Follow_Up_Work_Order: String
Inactive: String
Jobsite_Status: String
Lead: String
Legacy_Name: String
Map_to_Plant: String
New_Task_Pct: String
PF_External_Id: String
Plant_Address: String
Plant_City: String
Plant_Name: String
Plant_State: String
Plant_Street: String
Plant_Zip: String
Scheduled_Duration_h: String
Scheduled_Labor_Cost: String
Scheduled_Start_Time: String
Scheduled_Stop_Time: String
Assignment_Status: String
Status_Change_Time: String
Travel_Status_Start_Time: String
WO_Description: String
WO_Task_Percent_Complete: String
WO_Task_Description: String
WO_Task_Due_Date: String
WO_Task_Schedule_Date: String
WO_Type: String
Work_Order: String
Work_Order_Due_Date: String
Work_Order_Owner: String
Work_Order_Schedule_Date: String
Work_Order_Status: String
WO_Task: String
}
type SmWorkOrderRecordTypec @model @auth(rules: [{allow: public}]) {
id : ID!
developerName: String
name: String
layoutUrl: String
}
type SmRecentItems @model @auth(rules: [{allow: public}]) {
id : ID!
type: String
url: String
SfId: String,
Name: String
}
Example query:
const tables =[
{name: SmWorkOrderc.name, model: SmWorkOrderc, fields: ['Description'] },
{name: SmAssetTagc.name, model: SmAssetTagc, fields: ['Description']},
{name: SmWorkAssignmentc.name, model: SmWorkAssignmentc, fields: ['Name']},
{name: SmWorkTaskc.name, model: SmWorkTaskc, fields: ['Comments']},
]
for(const table of tables){
const results = await DataStore.query(table.model, c => c[field[0]](table.operator, 'query term'), {
page: offset,
limit: 5
});
//process results
}
@undefobj ☝️
These models do seem very large, my suspicion is that you are indeed running into the transformation limit of 1k foreach
iteration limit. Normally records are fetched locally with DataStore however if DataStore.query
is the first API call you're making in your app code, then this will do a network fetch hence you are seeing this bubble up.
The errorType: "MappingTemplate", Transformation too large.
is coming from the service, it is interesting you say:
If I query the data from the appsync console, everything works fine
That makes me think that the query returns in multiple "pages" (with nextToken) and one of the pages might have a record that causes the error. I would suggest you try a single model from the AppSync console. If the query is returning a nextToken
then try to pass it and see if one of the pages is causing your error.
Hey @gmineropfdrive :wave: are you still experiencing this issue?
I am experiencing this exact issue. One of the tables is throwing this error. I deleted a portion of the records that were added since the error was discovered, and data flowed again. When I added the dataset back into the table error returned.
Hey @0afcode :wave: apologies for the delay here. Can you see if this comment alleviates the issue? https://github.com/aws-amplify/amplify-cli/issues/9589#issuecomment-1020429790
We ended up removing many of the rows in each table. haven't run into this since.
Hey @0afcode 👋 apologies for the delay here. Can you see if this comment alleviates the issue? #9589 (comment)
We have confirmed that this issue on our app was due to the DataStore configuration property syncPageSize . Initially it was set to the default 1000. We lowered to 500 and the issue was resolved.
Hey @gmineropfdrive and @0afcode thank you for the clarification and glad to hear y'all are back up and running! I'll close this issue for now, however if you run into this again please feel free to reply back to this thread and we can re-open for further evaluation 🙂
Before opening, please confirm:
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
16.13.1
Amplify CLI Version
7.6.11
What operating system are you using?
Windows
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No
Amplify Categories
function, api
Amplify Commands
Not applicable
Describe the bug
My client application (React) does not seem to be syncing data from a dynamo table using appsync.
If I query the data from the appsync console, everything works fine. The client however, returns the following Error: errorType: "MappingTemplate", Transformation too large. However, I have confirmed with the amplify team (over discord) that the data is far from being 1MB
Expected behavior
My table should sync locally in indexDB from DynamoDb.
Reproduction steps
Created
GraphQL schema(s)
Log output
Additional information
No response