aws-amplify / amplify-cli

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
Apache License 2.0
2.81k stars 821 forks source link

Appsync not fetching dynamo table/rows Transformation too large #9589

Closed gmineropfdrive closed 2 years ago

gmineropfdrive commented 2 years ago

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)

```graphql # Put schemas below this line 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 pfId: String } type SmWorkOrderc @model @auth(rules: [{allow: public}]) { id: ID! External_Id__c: ID Sobject: String Orgid: String! pfId: 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__c: String ADS_Curtailment__c: String Account__c: String Action_Code2__c: String Action_Code__c: String Actual_Start_Date__c: String All_Log_Note__c: String Alternative_Work_Schedule__c: String Approval_Queue__c: String Approved_Date_Time__c: String Approved_Variance__c: String Asset_Default_Planner__c: String Asset_Group__c: String Asset_ID_Prefix__c: String Asset_ID_Text__c: String Asset_Location__c: String Asset_Project_Name__c: String Asset_Tag_Customer_Number__c: String Assigned_To__c: String Assigned_User_Active__c: String Assigned_User_Name_Text__c: String Assigned_Vendor__c: String Bill_to_EPC__c: String Billable_Status__c: String Billable__c: String Billing_Review__c: String Breaker_Control__c: String Business_Unit_Override__c: String Business_Unit__c: String CAISO_Generation_Desk__c: String CAISO_Metering__c: String CMRVAWOC__c: String CPR_First_Aid_AED_Required__c: String Calculated_Downtime__c: String Cap_Bank_Control__c: String Capability_During_Outage_MW__c: String Cause_Code2__c: String Cause_Code__c: String City__c: String Claim_Close_Date__c: String Claim_Description__c: String Claim_Number__c: String Claim_Status__c: String Claim_Submission_Date__c: String Class__c: String Close_Date__c: String Completed_Date_Time__c: String Completed_Time_From_Email__c: String Completion_Comments__c: String Completion_Date__c: String Completion_Notes__c: String Completion_Variance__c: String Contract_Curtailment_Limit_UOM__c: String Contract_Curtailment_Limit__c: String Contract_Term__c: String Contract_requirements__c: String Coordination_Email_Scheduled__c: String Count__c: String Created_Hrs__c: String Created_by_Email_Service__c: String Creator__c: String Current_User_Work_Order__c: String Curtailment_Control__c: String CustomerAsset_ID__c: String Customer_Asset_ID__c: String Customer_PO_Requirement_Override__c: String Customer_Purchase_Order_Number__c: String Customer_Reference_Number__c: String Days_Past_Scheduled_Completion__c: String Days_to_Complete_WO__c: String Delay_Code_Due_Date__c: String Delay_Notes_History__c: String Delay_Notes__c: String Delay_SubType__c: String Delay_Type__c: String Dept__c: String Description__c: String Detailed_Comments__c: String Downtime_hrs__c: String Driveway_Coordinates__c: String Due_Date_Day_of_Week__c: String Due_Date__c: String ELAM_WO__c: String ET_Assigned_User__c: String Eligible_Distribution_List__c: String Email_Response__c: String Employee_Phone_Number__c: String Entitlement_Name__c: String Entitlement_Term_Description__c: String Entitlement_Term_Text__c: String Entitlement_Term__c: String Entitlement__c: String Entity_Name__c: String Equip_Description__c: String Equipment_Sync_External_Id__c: String Equipment__c: String Event_Based_Entitlement_Email__c: String Event_Duration__c: String Event_End__c: String Event_Month__c: String Event_Start__c: String Event_based_AWO__c: String Excusable_Event_Type__c: String Excusable_Event__c: String Expense_Type__c: String Expert_Diagnosis_Status__c: String FBI__c: String Failure_Class__c: String Failure_Code2__c: String Failure_Code__c: String Field_Work_Completion_Date__c: String Field_Work_Status__c: String Fire_Dept_Phone__c: String Fire_Dept__c: String GL_Variable_1__c: String GL_Variable_2__c: String GL_Variable_3__c: String GL_Variable_4__c: String GWO__c: String Gate_Combo_Codes__c: String Geolocation__Latitude__s: String Geolocation__Longitude__s: String Geolocation__c: String Hospital_Address__c: String Hospital_Phone_number__c: String ID_Description__c: String ISO_Entity__c: String Identified_By__c: String Impact_System_Capacity__c: String In_Progress_Time_From_Email__c: String Initial_Est_Hours__c: String Instructions__c: String Insurance_Claim__c: String Inter_Connection_Line__c: String Interconnect__c: String Inverter_Control__c: String Invoice_Amount__c: String Invoice__c: String Is_EH_S__c: String LOTO__c: String Labor_Cost__c: String Last_Modified_Date__c: String Latest_Log_Note__c: String Legacy_Name__c: String Legacy_Work_Order_ID__c: String Long_Problem_Description__c: String Lost_Production__c: String Lost_Revenue__c: String MRVAWOC__c: String Manufacturer__c: String Material_Cost__c: String Meter_Description__c: String Meter_ID__c: String Meter_UOM__c: String Monthly_Report_Classification__c: String NERC_Registered__c: String NPFA_70_E_Required__c: String Not_To_Exceed_Amount__c: String Not_to_Exceed_Notes__c: String Notes__c: String Number_of_Flights_Required__c: String Number_of_Techs__c: String Number_of_Trucks_Required__c: String OMS_Number__c: String OMS_System__c: String OMS_URL__c: String OSHA_10_Required__c: String Operational_Event_Sync_External_Id__c: String Operational_Event__c: String Operator__c: String Operator_for_Sharing_Criteria__c: String Other_Costs_Misc__c: String Over_90_Days_Past_Scheduled_Completion__c: String Owner_Name__c: String Owner_Summary_Notes__c: String PF_Coordination_Required__c: String PF_External_Id__c: String PM_Assigned_Contact_Email__c: String PM_Group_Detail__c: String PM_Group_Schedule__c: String PM_Link__c: String PM_Schedule__c: String PO_Amount__c: String PO_Required__c: String Parent_Account__c: String Parent_Source_Work_Order__c: String Parent_Work_Order__c: String Part_Ship_to_Name_Address__c: String Part_Shipment_Details__c: String Part_Shipping_Comments__c: String Part_Shipping_Instructions__c: String Part_Shipping_Method__c: String Parts_Expense_Account__c: String Parts_Supplies_GL_Account__c: String Planner__c: String PlantID__c: String Plant_15_ID__c: String Plant_18_ID__c: String Plant_Available_Capacity__c: String Plant_Derated_Capacity_kW__c: String Plant_Description__c: String Plant_EnergyPrice_MidPeak__c: String Plant_Id__c: String Plant_Impact__c: String Plant_Name__c: String Plant_Region__c: String Plant_Sub_region__c: String Plant_UUID__c: String Plant__c: String Pole_ID__c: String Police_Phone__c: String Portfolio_18_ID__c: String Prevailing_Wage__c: String Priority__c: String QEW__c: String Quickbooks_Job_Number__c: String RE_Operator_Grouping__c: String RMA__c: String ROC_Alert_Type_Non_OE__c: String ROC_Coordination__c: String Rapid_Response_Site__c: String Ready_to_Invoice__c: String Recloser_ID__c: String Record_FW_Completion_Time__c: String Record_WO_Completed_Date_Time__c: String Record_WO_In_progress_Date_Time__c: String Reliability_Coordinator__c: String Report_Completion_Variance__c: String Reporting_Segment__c: String Requested_Completion_Date__c: String RequesterEmail__c: String Required_Part_Ship_Date__c: String Reschedule_Reason__c: String Resource_Assigned__c: String Resource_ID__c: String Revenue_Category__c: String Reviewed__c: String Roof_Access__c: String SO_Billing_Status__c: String SO_WO_Delta__c: String S_N_New_Part__c: String S_N_Old_Part__c: String Safety_Flag__c: String Safety_Request__c: String Sales_Order_Created_Date__c: String Sales_Order_Created__c: String Other_ID__c: String Scheduled_Action1_Date__c: String Scheduled_Action2_Date__c: String Scheduled_Action3_Date__c: String Scheduled_Action4_Date__c: String Scheduled_Action5_Date__c: String Scheduled_Completion_Date__c: String Scheduled_Completion_Variance__c: String Scheduled_Coordination__c: String Scheduled_Date_Time__c: String Scheduled_Onsite_Date__c: String Scheduled_Start_Date__c: String Scheduled_Time_From_Email__c: String Scheduled_Variance__c: String Scheduling_Coordinator_DA__c: String Scheduling_Coordinator_RT__c: String Scheduling_Coordinator__c: String Selected_Email_Notification_OE_NonOE__c: String Service_Location__c: String Service_Region__c: String Service_Type__c: String Shared_WO_Number_Formula__c: String Shared_WO_Number__c: String Sheriff__c: String Shipping_Rate__c: String Site_Access__c: String Site_Check_in_Procedures__c: String Site_Documentation__c: String Site_Email__c: String Site_Instructions__c: String Site_Name__c: String Site_Navigation_Map__c: String Site_Overview__c: String Site_Phone__c: String Site_Scheduling_Process__c: String Site_Status__c: String Site_Type__c: String Source_Work_Order_External_ID__c: String Spare_Part_Status__c: String State_Province__c: String StatusNumerical__c: String Status_Num__c: String Status__c: String Street_Address__c: String Sub_Class__c: String Sub_Contractor_Cost__c: String Sub_Type__c: String Sub_contractor__c: String Sync_Owner_Name__c: String System_Overview__c: String System_Size_kW_DC__c: String TimeStamp__c: String Total_Actual_Labor_Hours__c: String Total_Actual_WO_Costs_Utiity__c: String Total_Actual_Work_Order_Cost__c: String Total_Actual_Work_Order_Costs__c: String Total_Applicable_Tax__c: String Total_Work_Order_Planned_Cost__c: String Tower_Rescue_Required__c: String Track_WA_Working__c: String Tracker_Control__c: String Travel_Hours__c: String URL1__c: String Update_WO_Tasks_from_Completed_WO__c: String Utility_Account__c: String VAR_Control__c: String Vegetation_Height_in__c: String Vendor_Email__c: String Voltage_Control__c: String WA_Scheduled_Earliest_Stop_Time__c: String WO_Approved_Date_Time__c: String WO_Completed_Date_Time__c: String WO_Created_Date_Time__c: String WO_Created_in_Last_Hour__c: String WO_Due_Date__c: String WO_In_Progress_Date_Time__c: String WO_In_Progress_Variance__c: String WO_In_Progress_Working_Not_Travelling__c: String WO_Ready_To_Schedule_Date_Time__c: String WO_Ready_to_Invoice__c: String WO_Response_Time_Travelling_Time_track__c: String WO_Scheduled_Date_Time__c: String WO_Status__c: String WO_Type__c: String WO_User_Integer1__c: String WO_User_Number1__c: String WO_User_Picklist_1__c: String WO_User_Text_1__c: String Waiting_Approval_Message__c: String Warranty_Claim__c: String Warranty_Claim_yn__c: String Warranty_Type__c: String WorkOrder_Operator__c: String Work_Order_18__c: String Work_Order_Created_From_OE__c: String Work_Order_Field_Work_Compl_Variance__c: String Work_Order_Integration_Response__c: String Work_Order_Record_Type__c: String Work_Requester__c: String Zip_Postal_Code__c: String Field_Work_Tasks_Open__c: String Qty_of_Planned_Parts__c: String Reporting_Tasks_Open__c: String Total_Actual_DT_Labor_Hours__c: String Total_Actual_Labor_Cost__c: String Total_Actual_OT_Labor_Hours__c: String Total_Actual_Part_Cost__c: String Total_Actual_Reg_Labor_Hours__c: String Total_Actual_WO_Misc_Costs__c: String Total_Labor_Cost__c: String Total_Labor_Hours_Utility__c: String Total_Planned_Labor_Cost__c: String Total_Planned_Labor_Hours__c: String Total_Planned_Part_Cost__c: String Total_Planned_WO_Misc_Cost__c: String Total_Reporting_Tasks__c: String Total_WO_Misc_Costs__c: String WO_Tasks_Performed__c: String } type SmUserc @model @auth(rules: [{allow: public}]) { id: ID! Sobject: String Orgid: String pfId: 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__c: 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__c: String Filter_Item_List_Info__c: String Filter_Logic_Info__c: String Filter_Sql_Where__c: String IsProfilePhotoActive: String WorkspaceId: String IndividualId: String ReceivesInfoEmails: String UserSubtype: String IsSystemControlled: String Labor_Rate_Doubletime__c: String Labor_Rate_Overtime__c: String Labor_Rate_Regular__c: String LanguageLocaleKey: String LocaleSidKey: String ManagerId: String MobilePhone: String CommunityNickname: String OutOfOfficeMessage: String PasswordResetAttempt: String PasswordResetLockoutDate: String Paycom_Employee_Number__c: String PF_External_Id__c: String Phone: String ProfileId: String Receive_Entitlement_Task_Emails__c: String Regular_Hours_Per_Day__c: String UserRoleId: String FederationIdentifier: String IsExtIndicatorVisible: String StartDay: String StayInTouchNote: String StayInTouchSignature: String StayInTouchSubject: String Time_Sheet_Approver_1__c: 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 pfId: 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__c: String AC_UOM__c: String Account__c: String Account_Name__c: String ADS_Curtailment__c: String Annual_Contract_Energy_kWh__c: String Annual_PPA_Curtailment_Limit__c: String Asset_Class__c: String Asset_Group__c: String Asset_ID_Prefix__c: String Asset_ID_Prefix_Set__c: String Asset_in_PI__c: String Asset_Number__c: String Asset_Priority__c: String Asset_SubClass__c: String Asset_Tag_Image__c: String Asset_Tag_Image_URL__c: String AssetRecordType__c: String Asset_UUID__c: String AT18__c: String Available_Capacity__c: String Part_Bin_Location__c: String blankfield__c: String Breaker_Control__c: String Business_Segment__c: String Plant_Business_Segment__c: String Cap_Bank_Control__c: String CHECKED__c: String City__c: String Clipping_Limit__c: String Coeff_A__c: String Coeff_B__c: String Coeff_C__c: String Coeff_D__c: String Commercial_Entity_account__c: String Connection_Device__c: String Continent__c: String Contract_Curtailment_Limit__c: String Contract_Curtailment_Limit_UOM__c: String Coordinator_s_Information__c: String Country__c: String Covered_Equipment__c: String CPR_First_Aid_AED_Required__c: String Create_Summary_Assets__c: String Curtailment_control__c: String CustomerAsset_ID__c: String Customer_Asset_ID__c: String Customer_Asset_Name__c: String Customer_has_Visibility__c: String Data_Aquisition_System__c: String Data_Communications_Flat_Line_Time_Delay__c: String Data_Communications_FLine_Trigger_Value__c: String DC_Capacity__c: String DC_UOM__c: String Default_Failure_Class__c: String Default_Planner__c: String Dept__c: String Derated_Capacity__c: String Description__c: String Do_not_sync_to_Drive__c: String Driveway_Coordinates__c: String Energy_Contract_Anniversary_Date__c: String Energy_Source__c: String EnergyPrice_MidPeak__c: String EnergyPrice_OffPeak__c: String EnergyPrice_OnPeak__c: String Engine__c: String Entitlement_Term__c: String Equipment_Count__c: String Equipment_Location__c: String ET_Assigned_user_Plant_Level__c: String External_Asset_ID__c: String External_ID_AT__c: String External_Sys_ID__c: String FBI__c: String Fire_Dept__c: String Fuel_Type__c: String Geolocation__c: String GL_Variable_1__c: String GL_Variable_2__c: String GL_Variable_3__c: String GL_Variable_4__c: String Gross_Vehicle_Weight__c: String GWO__c: String Hierarchy_Display__c: String Hierarchy_Sort_Order__c: String HolCo_18_ID__c: String ID_Description__c: String Image__c: String Impedance__c: String In_Service_Date__c: String Interconnect__c: String Interconnection_Line__c: String Interconnection_Type__c: String Inverter_Capacity__c: String Inverter_Control__c: String Inverter_forced_Outage_Time_Delay__c: String Inverter_Forced_Outage_Trigger_Value__c: String Inverter_Performance_Alert_Time_Delay__c: String Inverter_Performance_Alert_Trigger_Value__c: String Inverter_Qty__c: String Is_not_in_Drive__c: String ISO_Entity__c: String CAISO_Generation_Desk__c: String CAISO_Metering__c: String KVA_Rating__c: String Last_date_Verified__c: String Latitude__c: String Location_text__c: String Longitude__c: String LOTO__c: String MA_LSTWK_O_M_Log__c: String Manufacturer__c: String Manufacturer_Data_Identifier__c: String Manufacturer_Name__c: String Mfg_Date__c: String Mfg_Year__c: String Model_Number__c: String Model_Number_lk__c: String Module_Degradation_Effective_Date__c: String Module_Degradation_Rate__c: String Monitored_by__c: String Monitored_in_Drive__c: String Nameplate_Data__c: String Nation__c: String NERC_Registered__c: String Notes__c: String NPFA_70_E_Required__c: String Doors__c: String Component_Part__c: String Oil_Type__c: String OMS_System__c: String OMS_URL__c: String Operator__c: String Operator_formula__c: String Operator_Plant_Count__c: String OSHA_10_Required__c: String Parent__c: String Parent_Description__c: String Parent_ID_Text__c: String Part_Bucket__c: String Part_Id__c: String Parts_Supplies_GL_Account__c: String Parts_Expense_Account__c: String Plant__c: String PF_External_Id__c: String Plant_15_ID__c: String Plant_18_ID__c: String Plant_Contact__c: String Plant_Description__c: String Plant_forced_Outage_Time_Delay__c: String Plant_Forced_Outage_Trigger_Value__c: String PlantName__c: String Plant_Performance_Alert_Time_Delay__c: String Plant_Performance_Alert_Trigger_Value__c: String Plant_UUID__c: String PlantID__c: String PO_Number__c: String Pole_ID__c: String Portfolio_15_ID__c: String Portfolio_18_ID__c: String Portfolio_Group__c: String Power_Factors__c: String PPA_Curtailment_Limit_UOM__c: String Primary_Voltage__c: String Product__c: String Project_Number__c: String Project_Owner__c: String Project_Plant__c: String Project_Plant_Description__c: String Purchase_Date__c: String QEW__c: String QR_Code__c: String Rapid_Response_Site__c: String RE_LSTWK_OM_Log__c: String RE_OM_Log_URL__c: String Recloser_ID__c: String Region__c: String Reliability_Coordinator__c: String Reporting_Asset_Group__c: String Resource_ID__c: String RTId__c: String Other_ID__c: String Scheduling_Coordinator__c: String Scheduling_Coordinator_DA__c: String Scheduling_Coordinator_RT__c: String Search__c: String Secondary_Voltage__c: String Serial_Number__c: String Service_Location__c: String Service_Region__c: String Sheriff__c: String Site_Controls__c: String Site_Nameplate_Capacity_kW__c: String Site_Status__c: String State_Province__c: String Status__c: String Street__c: String Sub_region__c: String Time_Zone__c: String Top_Level__c: String Top_Level_Parent__c: String Tower_Rescue_Required__c: String Tracker_Capacity__c: String Tracker_Control__c: String Tracker_Qty__c: String Transmission__c: String Transmission_Operator__c: String Transmission_Operator_RT__c: String Type__c: String Unique_Name__c: String Utility_Account__c: String uxid__c: String VAR_control__c: String VIN__c: String Voltage_control__c: String Warranty__c: String Warranty_Expiration_Date__c: String Warranty_Start_Date__c: String Wheel_Drive__c: String Y_intercept__c: String Zip_Postal_Code__c: String } type SmWorkTaskc @model @auth(rules: [{allow: public}]) { id: ID! Sobject: String Orgid: String pfId: 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__c: String Account__c: String Account_pfDC_ID__c: String Actual_DT_Labor_Cost__c: String Actual_DT_Labor_Hours__c: String Actual_Labor_Hours__c: String Actual_OT_Labor_Cost__c: String Actual_OT_Labor_Hours__c: String Actual_Reg_Labor_Cost__c: String Actual_Reg_Labor_Hours__c: String Asset_Description__c: String Asset_ID__c: String Asset_pfDC_ID__c: String Resource_Assigned__c: String Assignment__c: String Assigned_User_Role__c: String Assigned_Vendor__c: String Confirm_or_Complete_Assignments__c: String Craft__c: String Create_Date__c: String Created_Date_ReadOnly__c: String Current_User_WO_Task__c: String Customer_Project_Number__c: String Days_to_Complete_WO_Task__c: String Comments__c: String Dispatch_Description__c: String Due_Date_ReadOnly__c: String Due_Date__c: String Est_Hrs_at_Completion__c: String Est_Hrs_to_Complete__c: String External_Id__c: String Grass_Height__c: String Hours_per_MW__c: String Include_In_Service_Report__c: String InstructionsRT__c: String Instructions__c: String Labor_Cost__c: String Legacy_Name__c: String My_WO_Task__c: String Percent_Complete__c: String Performed__c: String PF_External_Id__c: String Planned_Hours__c: String Planned_Hrs_Remaining__c: String Planned_Labor_Cost__c: String Previous_Percent_Complete__c: String Priority__c: String Report_Status__c: String Schedule_Date__c: String Step__c: String Service_Region__c: String Service_Report_Delivery_Date__c: String Special_Tools_Required__c: String Std_Task__c: String Suggested_WO_Assignment_Duration__c: String Suppress_Standard_Work_Task_Updates__c: String Task_Due_Date__c: String Task_steps_completed__c: String Total_Actual_Labor_Cost__c: String Total_Actual_Labor_Hours__c: String Total_Steps__c: String URL1__c: String View_in_Dispatch_Console__c: String WO_Asset_Description__c: String WO_AssetID__c: String WO_AssetID_Prefix__c: String WO_Description__c: String WO_Due_Date__c: String WO_Status__c: String WO_Task_Actual_Completion_Date__c: String WO_Task_Actual_Start_Date__c: String WO_Type__c: String Work_Order__c: String Work_Order_Assigned_User__c: String Work_Order_Record_Type__c: String WOT_User_Text_1__c: String WOT_Asset_Subclass__c: String WOT_User_Integer1__c: String WOT_User_Number1__c: String WOT_User_Picklist_1__c: String WT_Completion_Date__c: String } type SmWorkAssignmentc @model @auth(rules: [{allow: public}]) { id: ID! Sobject: String Orgid: String pfId: 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__c: String Account_pfDC_ID__c: String IsAllDayEvent__c: String Asset_pfDC_ID__c: String AssetID__c: String Assigned_User__c: String Assignment_Due_Date__c: String Assignment_Schedule_Date__c: String Check_In_Map_Location__c: String Check_Out_Map_Location__c: String Check_In_Location__c: String Check_In_Time__c: String Check_Out_Location__c: String Check_Out_Time__c: String CHECKED__c: String Completed__c: String Current__c: String Current_Assignment__c: String Current_Hours_Accumulated__c: String Flagged__c: String Follow_Up_Work_Description__c: String Follow_Up_Work_Order__c: String Inactive__c: String Jobsite_Status__c: String Lead__c: String Legacy_Name__c: String Map_to_Plant__c: String New_Task_Pct__c: String PF_External_Id__c: String Plant_Address__c: String Plant_City__c: String Plant_Name__c: String Plant_State__c: String Plant_Street__c: String Plant_Zip__c: String Scheduled_Duration_h__c: String Scheduled_Labor_Cost__c: String Scheduled_Start_Time__c: String Scheduled_Stop_Time__c: String Assignment_Status__c: String Status_Change_Time__c: String Travel_Status_Start_Time__c: String WO_Description__c: String WO_Task_Percent_Complete__c: String WO_Task_Description__c: String WO_Task_Due_Date__c: String WO_Task_Schedule_Date__c: String WO_Type__c: String Work_Order__c: String Work_Order_Due_Date__c: String Work_Order_Owner__c: String Work_Order_Schedule_Date__c: String Work_Order_Status__c: String WO_Task__c: 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 pfId: String, Name: String } ```

Log output

``` # Put your logs below this line table: SmWorkOrderc errorType: "MappingTemplate", Transformation too large ```

Additional information

No response

undefobj commented 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.

gmineropfdrive commented 2 years ago

@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 commented 2 years ago

@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?

gmineropfdrive commented 2 years ago

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 ☝️

undefobj commented 2 years ago

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.

josefaidt commented 2 years ago

Hey @gmineropfdrive :wave: are you still experiencing this issue?

0afcode commented 2 years ago

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.

josefaidt commented 2 years ago

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

gmineropfdrive commented 2 years ago

We ended up removing many of the rows in each table. haven't run into this since.

0afcode commented 2 years ago

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.

josefaidt commented 2 years ago

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 🙂