aws-amplify / amplify-codegen

Amplify Codegen is a JavaScript toolkit library for frontend and mobile developers building Amplify applications.
Apache License 2.0
59 stars 57 forks source link

[WARN] 16:19.312 DataStore - Skipping incoming subscription. #805

Closed ErikHochweller closed 2 months ago

ErikHochweller commented 3 months ago

Amplify CLI Version

10.7.3

Question

I inherited an app in AWS and am facing some issues that I dont fully understand as this is not something i have been involved with earlier. I have two issue, the first is whats in the title. When i create a new inquiry through my app front end interface (react) i dont get this message. It uses datastore. If i run "the same" through a lambda function using node all users logged into the app get the message:

[WARN] 16:19.312 DataStore - Skipping incoming subscription. Messages: Cannot return null for non-nullable type: 'AWSDateTime' within parent 'Inquiry' (/onCreateInquiry/createdAt)
Cannot return null for non-nullable type: 'AWSDateTime' within parent 'Inquiry' (/onCreateInquiry/updatedAt)
Cannot return null for non-nullable type: 'Int' within parent 'Inquiry' (/onCreateInquiry/_version)
Cannot return null for non-nullable type: 'AWSTimestamp' within parent 'Inquiry' (/onCreateInquiry/_lastChangedAt)

and my database runs super sluggish and i cant really update anything. It does some updates after 10 minutes so it seems that there is something hanging somewhere. I have seen other threads on this topic but i couldnt figure it out through them

In my lambda function im using graphql. As far as i can tell its using Appsync and dynamodb. i have conflict resolution enabled and set to optimistic concurrency

any help on this would be appreciated :)

the second issue i will create a new issue for but its this:

[WARN] 24:58.67 DataStore - User is unauthorized to query syncSurfaces with auth mode API_KEY. No data could be returned.

but it seems to have API key in there:

    syncSurfaces(
        filter: ModelSurfaceFilterInput,
        limit: Int,
        nextToken: String,
        lastSync: AWSTimestamp
    ): ModelSurfaceConnection
        @aws_api_key
@aws_iam

Here is the code im using in my createInquiry function:

/* eslint-disable @typescript-eslint/no-var-requires */
/* Amplify Params - DO NOT EDIT
    API_XXXXXL_GRAPHQLAPIENDPOINTOUTPUT
    API_XXXXXXL_GRAPHQLAPIIDOUTPUT
    API_XXXXXXL_GRAPHQLAPIKEYOUTPUT
    ENV
    REGION
Amplify Params - DO NOT EDIT */

/**
 * @type {import('@types/aws-lambda').APIGatewayProxyHandler}
 */
const { HttpRequest } = require('@aws-sdk/protocol-http');
const { SES } = require('aws-sdk');
const fetch = require('node-fetch');
const simpleEmailService = new SES();
const { Request } = fetch;

const {
    API_XXXXX_GRAPHQLAPIENDPOINTOUTPUT: GRAPHQL_ENDPOINT,
    API_XXXXX_GRAPHQLAPIKEYOUTPUT: GRAPHQL_API_KEY,
} = process.env;

const getAllPartners = async () => {
    const endpoint = new URL(GRAPHQL_ENDPOINT);
    const query = /* GraphQL */ `
        query GetAllPartners {
            listOrganizations {
                items {
                    id
                    email
                    name
                    _deleted
                    endCustomerPortalData {
                        companyIdentifier
                    }
                }
            }
        }
    `;
    const options = new HttpRequest({
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            host: endpoint.host,
            'x-api-key': GRAPHQL_API_KEY,
        },
        hostname: endpoint.host,
        body: JSON.stringify({ query }),
        path: endpoint.pathname,
    });

    const request = new Request(endpoint, options);

    try {
        const response = await fetch(request);
        const body = await response.json();
        if (body.errors) {
            throw new Error('Failed to fetch inquiries data: ' + JSON.stringify(body.errors));
        } else {
            const { data } = body;
            return data.listOrganizations.items; // Return the list of partners
        }
    } catch (error) {
        throw new Error(error.message);
    }
};

const createInquiry = async ({
    status = 'NEW',
    name: customerName,
    email = '',
    telephone: phone = '',
    address = '',
    postcode: postNumber = '',
    building: buildingType = 'NYBYGG',
    comments = '',
    productId: productcategoryidID,
    solintegraID = '',
    origin = '',
    statusCreatedDate = new Date().toISOString().split('T')[0],
    statusLastAction = new Date().toISOString().split('T')[0],
    longitude = 0,
    latitude = 0,
    streetAddress = '',
    postCode = '',
}) => {
    const variables = {
        input: {
            status,
            customerName,
            productcategoryidID,
            email,
            phone,
            postNumber,
            address,
            comments,
            buildingType,
            solintegraID,
            origin,
            statusCreatedDate,
            statusLastAction,
            buildingDetails: {
                longitude,
                latitude,
                postNumber,
                streetAddress,
            },
        },
    };
    const query = /* GraphQL */ `
        mutation CreateInquiry($input: CreateInquiryInput!) {
            createInquiry(input: $input) {
                id
            }
        }
    `;
    const {
        data: {
            createInquiry: { id: inquiryId },
        },
    } = await graphQL(query, variables);

    return inquiryId;
};
const graphQL = async (query, variables) => {
    const endpoint = new URL(GRAPHQL_ENDPOINT);
    const options = new HttpRequest({
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            host: endpoint.host,
            'x-api-key': GRAPHQL_API_KEY,
        },
        hostname: endpoint.host,
        body: JSON.stringify({ query, variables }),
        path: endpoint.pathname,
    });

    const request = new Request(endpoint, options);

    try {
        const response = await fetch(request);
        const body = await response.json();
        if (body.errors) {
            throw new Error('GraphQL query failed: ' + JSON.stringify(body.errors));
        } else {
            return body;
        }
    } catch (error) {
        throw new Error(error.message);
    }
};

exports.handler = async (event) => {
    //console.log(`EVENT: ${JSON.stringify(event)}`);
    ..........

    const variables = {
        name: event.Name,
        email: event.Email,
        telephone: event.Telephone,
        address: event.Address,
        postcode: event.Postcode,
        building: event.Whattypeofbuild,
        productId: productId,
        comments: event.Comment,
        files: '',
        origin: event.Origin,
        statusCreatedDate: new Date().toISOString().split('T')[0],
        statusLastAction: new Date().toISOString().split('T')[0],

    };
    const createdID = await createInquiry({
        ...variables,
        solintegraID,
        latitude: Y,
        longitude: X,
        postNumber: postCode,
        streetAddress: norkartAddress,
        houseID: houseID,
    });

  my schema looks like this:

  type Licenses {
  basic: Boolean
  professional: Boolean
  premium: Boolean
  buyLeads: Boolean
  markedsLeds: Boolean
  lastChange: AWSDate
}

enum DocumentType {
  DATASHEET
  CERTIFICATION
  BIMMODEL
  MANUAL
  EPD
  CONFORMITY
  GUIDES
  VIDEO
}

type Documentation @model @auth(rules: [{allow: public}]) {
  id: ID!
  name: String
  documentType: DocumentType
  relatedToDocument: String
  fileLocation: String
  belongsToSolution: String
  productCategoryIdentifier: String
}

type OfferOwner {
  logo: String
  email: String
  orgNumber: String
  name: String
}

type AdditionalCosts {
  description: String
  cost: Int
  perPanel: Boolean
  perSurface: Boolean
  perProject: Boolean
  solutionName: String
  perSurfaceHeight: Boolean
  perSurfaceHeightCalculation: String
  perSurfaceWidth: Boolean
  perSurfaceWidthCalculation: String
  includedInEndCustomerToolCalculation: Boolean
  heading: String
}

type EndCustomerPortalData {
  primaryColor: String
  secondaryColor: String
  textColor: String
  solarScoreHigh: String
  solarScoreHighMedium: String
  solarScoreMedium: String
  solarScoreMediumLow: String
  solarScoreLow: String
  companyIdentifier: String
  backgroundImageAddressSearch: String
}

type ProductCategoryList @model @auth(rules: [{allow: public}]) {
  id: ID!
  name: String
  calcMethod: String
}

type CompanyToBeInvited @model @auth(rules: [{allow: public}]) {
  id: ID!
  code: String
  email: String
  orgID: String
  userEmail: String
  companyEmail: String
}

type SurfacesOfferLetter {
  name: String
  picture: String
  surfaceID: String
  amountOfPanels: Int
  kWp: Float
  production: Int
}

type PartnerInfoOfferLetter {
  name: String
  orgNo: String
  description: String
  logo: String
  email: String
}

type PersonalDataOfferLet {
  name: String
  streetAddress: String
  postCode: String
  lat: Float
  long: Float
  email: String
  phone: String
}

type TechnicalInfoOfferLetter {
  amountOfPanels: Int
  kWp: Int
  totalYearlyProduction: Int
  solutionName: String
  panelProductID: String
  panelDescription: String
  inverterName: String
  inverterGrid: String
  solutionDescription: String
  solutionDescriptionSecondary: String
  name: String
  power: Int
  solutionLogo: String
}

type CostsOfferLetter {
  partsPrice: Float
  enova: Float
  additionalDiscount: Float
  endPrice: Float
  pricePerKw: Float
  lifeTimeSaving: Int
  installerCosts: Float
  additionalDiscountReason: String
}

type OfferLetterData @model @auth(rules: [{allow: public}]) {
  id: ID!
  leadID: String
  price: CostsOfferLetter
  specifications: TechnicalInfoOfferLetter
  personalData: PersonalDataOfferLet
  partnerInfo: [PartnerInfoOfferLetter]
  surfaces: [SurfacesOfferLetter]
  reservations: [String]
  createdDate: AWSDateTime
  offerValidity: Int
  offerOwner: OfferOwner
}

type ExchangeRates {
  to: Currency
  from: Currency
  rate: Float
  id: ID!
}

type TandCs @model @auth(rules: [{allow: public}]) {
  id: ID!
  TandCswords: String
  order: Int
  orderSecond: Int
}

type Statistic @model @auth(rules: [{allow: public}]) {
  id: ID!
  dateGathered: AWSDate
  organizationID: String
  dataString: String
  amount: String
}

type WebpageText @model @auth(rules: [{allow: public}]) {
  id: ID!
  variable: String
  norwegian: String
  swedish: String
  danish: String
  english: String
  german: String
  french: String
}

type SolutionParameters {
  costPerPanelMounting: Int
  costPerPanelElectrician: Int
  discount: Int
  name: String
  id: String
  margin: Int
  allowPartnerToSetPrice: Boolean
  handlingFee: Int
  lockedForDistribution: Boolean
}

enum CrmTool {
  PIPEDRIVE
}

type ToggleState {
  isDummy: Boolean
  isPanel: Boolean
  isNothing: Boolean
}

type ArrOfGridItems {
  column: Int
  gridItemNumber: Int
  isDimensionCorrect: Boolean
  isEnd: Boolean
  isStart: Boolean
  realHeight: Int
  realWidth: Int
  row: Int
  surfaceId: String
  toggleState: ToggleState
}

type Message @model @auth(rules: [{allow: public}]) {
  id: ID!
  leadID: String
  sender: String
  createDate: AWSDate
  messageContent: String
  receiver: String
  read: Boolean
}

type Cords {
  x: Float
  y: Float
  z: Float
}

type Polygons {
  cords: [Cords]
}

type Municipality @model @auth(rules: [{allow: public}]) {
  id: ID!
  municipal: String
  snowLoad: Float
  windLoad: Int
  heightOverWater: Int
  additionalSnowLoadPer100: Float
}

type ObstructionTriangle @model @auth(rules: [{allow: public}]) {
  id: ID!
  surfaceID: String
  x1: Int
  x2: Int
  x3: Int
  y1: Int
  y2: Int
  y3: Int
  surfaceIndex: Int
  inquiryID: String
}

type FAQ @model @auth(rules: [{allow: public}]) {
  id: ID!
  question: String!
  answer: String!
}

type FutureUpdatesToCome @model @auth(rules: [{allow: public}]) {
  id: ID!
  featureToCome: String!
  dateToCome: AWSDate!
}

type WelcomeUpdates @model @auth(rules: [{allow: public}]) {
  id: ID!
  updateMessage: String!
  orderToShow: Int!
}

enum Orientation {
  HORIZONTAL
  VERTICAL
}

type InverterTechnicalData @model @auth(rules: [{allow: public}]) {
  id: ID!
  Product: Products! @hasOne
  name: String!
  grid: Grid!
  wpMin: Int!
  wpMax: Int!
  maxVoltsPerString: Int
  numberOfStringPerMPPT: Int
  numberOfMPPTs: Int
  minVoltsPerString: Int
}

type AcceptedLeadOffer {
  acceptedDate: AWSDateTime!
  estimatedDeliveryDate: AWSDateTime
  totalPriceAcceptedNOK: Float!
  parts: OfferParts!
  priceElectricianAccepted: Float!
  priceBuilderAccepted: Float!
  priceElectricianComment: String!
  priceBuilderComment: String!
  partsNew: AWSJSON
  offerSolutionName: String
  lastOfferletterID: String
}

type OfferPart {
  productId: String!
  name: String!
  orderedAmount: Int!
  calculatedAmount: Int!
  priceNOK: Float!
}

type OfferParts {
  solarPanel: OfferPart
  blindPanelWhole: OfferPart
  blindPanelHalf: OfferPart
  profileSetA: OfferPart
  profileSetB: OfferPart
  profileSetC: OfferPart
  starterClamps: OfferPart
  regularClamps: OfferPart
  reinforcedClamps: OfferPart
  inverter: OfferPart
  inverterWifiStick: OfferPart
  cable: OfferPart
  ventilation: OfferPart
  hanPlugs: OfferPart
  hunPlugs: OfferPart
  roofLadder: OfferPart
  snowcatcher: OfferPart
  switchtwopole: OfferPart
  switch: OfferPart
  optimizer: OfferPart
  hooksoutsidetiles: OfferPart
  rail: OfferPart
  screwsoutsidetiles: OfferPart
  connectoroutsidetiles: OfferPart
  tiledRoofClamps: OfferPart
  tiledRoofFlashing: OfferPart
  hasselblindpanel: OfferPart
  hasselAluBolt: OfferPart
  hasselGummiProfilUnderPanel: OfferPart
  hasselBeslagMellomPanelVertikal: OfferPart
  hasselBeslagSiden120: OfferPart
  hasselBeslagsiden300: OfferPart
  hasselEndeStopp: OfferPart
  hasselKlemProfil: OfferPart
  hasselMoneBeslag: OfferPart
  hasselSkruerTilKlemProfil: OfferPart
  hasselStuftRustFri: OfferPart
  hasselTeningsMasse: OfferPart
  hasselBeslagMellomPanelHorizontal: OfferPart
  solartagBlindPanel: OfferPart
  solartagStarterClamp: OfferPart
  solartagRegularClamp: OfferPart
  solartagMoneBeslag: OfferPart
  solartagSideBeslag: OfferPart
  hasselFestKombinertFuggleSperre: OfferPart
  hasselSnofangerKonsoll: OfferPart
  hasselSnofanger: OfferPart
  hasselKabel6mm: OfferPart
  hasselMc4Plugger: OfferPart
  hasselEkstraBeslagRundtPipe: OfferPart
  hasselMoneVentilasjonListStor: OfferPart
  hasselSkruerTilBeslag: OfferPart
  hasselMoneVentilasjonListLiten: OfferPart
}

type LeadOffer {
  offerGeneratedDate: AWSDateTime!
  totalPriceOfferedNOK: Float!
  parts: OfferParts!
  priceElectrician: Float!
  priceBuilder: Float!
  priceElectricianComment: String!
  priceBuilderComment: String!
  partnerDiscountAmount: Float
  partsNew: AWSJSON
  offerSolutionName: String
  lastOfferletterID: String
}

enum ProductCategory {
  SOLARPANEL
  BLINDPANELWHOLE
  BLINDPANELHALF
  PROFILESETA
  PROFILESETB
  PROFILESETC
  STARTERCLAMPS
  REGULARCLAMPS
  REINFORCEDCLAMPS
  INVERTER
  INVERTERWIFISTICK
  CABLE
  VENTILATION
  HANPLUGS
  HUNPLUGS
  ROOFLADDER
  SNOWCATCHER
  SWITCHTWOPOLE
  SWITCH
  OPTIMIZER
  HOOKSOUTSIDETILES
  RAIL
  SCREWSOUTSIDETILES
  CONNECTOROUTSIDETILES
  TILEDROOFCLAMPS
  TILEDROOFFLASHING
  HASSELBLINDPANEL
  HASSELGUMMIPROFILUNDERPANEL
  HASSELSTUFTERRUSTFRI
  HASSELKLEMPROFIL
  HASSELALUBOLT
  HASSELENDESTOPP
  HASSELBESLAGMELLOMPANELHORIZONTAL
  HASSELBESLAGMELLOMPANELVERITKAL
  HASSELSKRUERTILKLEMPROFIL
  HASSELTENINGSMASSE
  HASSELBESLAGSIDEN120
  HASSELBESLAGSIDEN300
  HASSELMONEBESLAG
  SOLARTAGBLINDPANEL
  SOLARTAGESTARTCLAMP
  SOLARTAGREGULARCLAMP
  SOLARTAGMONEBESLAG
  SOLARTAGSIDEBESLAG
  HASSELFESTKOMBINERTFUGLESPERRE
  HASSELSNOFANGERKONSOLL
  HASSELSNOFANGER
  HASSELKABELSEKSMM
  HASSELMCPLUGGER
  HASSELEKSTRABESLAGRUNDTPIPE
  HASSELMONEVENTILASJONLISTLITEN
  HASSELSKRUERTILBESLAG
  HASSELMONEVENTILASJONLISTSTOR
}

type Products @model @auth(rules: [{allow: public}]) {
  id: ID!
  name: String!
  productId: String!
  priceNOK: Float!
  category: ProductCategory!
  belongsToSolution: String
  originalCurrency: Currency
  calcMethod: String
  categoryIdentifier: String
  order: Int
}

type SolarCellTechnicalData @model @auth(rules: [{allow: public}]) {
  id: ID!
  name: String
  height: Int
  width: Int
  profileAMinHeight: Int
  profileAMaxHeight: Int
  profileBMinHeight: Int
  profileBMaxHeight: Int
  profileCMinHeight: Int
  profileCMaxHeight: Int
  power: Int
  productcategoryidID: ID! @index(name: "byProductCategoryID")
  Product: Products! @hasOne
  orientation: Orientation!
  battenSpacingMin: Int
  battenSpacingMax: Int
  tilesPerPanel: Int
  voltsInStandardCondition: Float
  maxVoltForPanel: Int
  description: String
  logo: String
}

type Obstruction {
  obstructionType: ObstructionType
  height: Int
  width: Int
  fromTop: Int
  fromLeft: Int
  fromBottom: Int
  fromRight: Int
  slope: Float
}

type FuseBox {
  comments: String
  files: [String]
  charging: Boolean
  newfusebox: Boolean
  smarthouse: Boolean
  battery: Boolean
  other: String
  grid: Grid
}

enum ObstructionType {
  TAKSTIGE
  TAKVINDU
  PIPE
  SNOFANGER
  TAKHATT
  KVIST
  ARK
}

type Surface @model @auth(rules: [{allow: public}]) {
  id: ID!
  name: String
  height: Int
  width: Int
  azimuth: Float
  isMainSurface: Boolean
  roofExtensionShortSide: Int
  roofExtensionLongSide: Int
  slope: Float
  comments: String
  files: [String]
  inquiryID: ID! @index(name: "byInquiry")
  obstructions: [Obstruction]
  isCustomSurface: Boolean
  mappingID: String
  geometry: [Polygons]
  arrOfGridItems: [ArrOfGridItems]
  solutionType: String
  panelId: String
  selectedProfileValue: Int
  selectedAdjustmentType: String
  flipRest: Boolean
  extraMarginVertical: Int
  extraMarginHorizontal: Int
  mapServiceID: String
}

enum RoofType {
  SALTAK
  PULTAK
  VALMTAK
  OTHER
}

type BuildingDetails {
  municipality: String
  farmUnitNumber: String
  propertyUnitNumber: String
  roofType: RoofType
  shortSide: Int
  longSide: Int
  streetAddress: String
  postNumber: String
  latitude: Float
  longitude: Float
  houseID: String
}

enum Grid {
  IT1X230V
  IT3X230V
  TN3X400V
}

enum Currency {
  NOK
  USD
  GBP
  EUR
  DKK
  SKK
}

enum OrgType {
  CONSTRUCTION
  ELECTRICIAN
}

type Organization @model @auth(rules: [{allow: public}]) {
  id: ID!
  orgNo: String
  orgType: OrgType
  logo: String
  name: String
  city: String
  streetAddress: String
  phone: AWSPhone
  email: AWSEmail
  postcode: Int
  currency: Currency
  Discount: Int
  Inquiries: [Inquiry] @hasMany(indexName: "byOrganization", fields: ["id"])
  Users: [Users] @hasMany(indexName: "byOrganization", fields: ["id"])
  agreementTerms: String
  subUnits: [String]
  subOrgs: Boolean
  coverage: [Polygons]
  parent: String
  approvedSolutions: [String]
  ownedSolutions: [String]
  crmAPIKey: String
  crmTool: CrmTool
  crmLink: String
  reservations: [String]
  acceptedSolutionParameters: [SolutionParameters]
  retailerSolutions: [String]
  exchangeRate: [ExchangeRates]
  description: String
  endCustomerPortalData: EndCustomerPortalData
  additionalCosts: [AdditionalCosts]
  licenses: Licenses
}

enum UserStatus {
  PENDING
  ACTIVE
}

type Users @model @auth(rules: [{allow: public, operations: [create, read, update, delete]}]) {
  id: ID!
  picture: AWSURL
  status: UserStatus
  firstname: String
  lastname: String
  phone: AWSPhone
  email: AWSEmail
  organizationID: ID @index(name: "byOrganization")
  acceptedTandCs: Boolean
}

enum BuildingType {
  REHABILITERING
  NYBYGG
}

type ProductCategoryID @model @auth(rules: [{allow: public}]) {
  id: ID!
  name: String
  description: String
  logo: String
  Inquiries: [Inquiry] @hasMany(indexName: "byProductCategoryID", fields: ["id"])
  SolarCellTechnicalData: [SolarCellTechnicalData] @hasMany(indexName: "byProductCategoryID", fields: ["id"])
  descriptionSecondary: String
  flipRest: Boolean
  selectedAdjustmentType: Boolean
  variableHeightForPanels: Boolean
  offsetPanelSetup: Boolean
  coversFullyRoof: Boolean
  marginsPossible: Boolean
  solutionIncludesDummies: Boolean
  offerValidity: Int
  topBottomDefaultValue: Int
  leftRightDefaultValue: Int
  dummiesText: String
  additionalBottomRowHeight: Int
  defaultPanel: String
}

enum InquiryStatus {
  NEW
  ARCHIVED
  DELIVERED
  OPENED
  ACCEPTED
  DECLINED
  AWAITINGCONTACT
  CALCULATING
  OFFERSENT
  OFFERAPPROVED
  OFFERREJECTED
  PROCESSING
  TOBEDELETED
  COMPLETE
}

type Inquiry @model @auth(rules: [{allow: public, operations: [create, read, update, delete]}]) {
  id: ID!
  status: InquiryStatus
  customerName: String
  productcategoryidID: ID @index(name: "byProductCategoryID")
  email: String
  phone: String
  address: String
  postNumber: String
  comments: String
  buildingType: BuildingType
  files: [String]
  solintegraID: String
  organizationID: ID @index(name: "byOrganization")
  customerContactDate: AWSDate
  buildingDetails: BuildingDetails
  fuseBox: FuseBox
  Surfaces: [Surface] @hasMany(indexName: "byInquiry", fields: ["id"])
  offer: LeadOffer
  acceptedOffer: AcceptedLeadOffer
  origin: String
  statusCreatedDate: AWSDate
  statusPartnAcceptedDate: AWSDate
  statusFirstOfferDate: AWSDate
  statusPlanningDate: AWSDate
  statusRoofDesignDate: AWSDate
  statusLastOfferDate: AWSDate
  statusOfferAcceptedDate: AWSDate
  statusLastAction: AWSDate
  statusAssignedPartnerDate: AWSDate
  statusComplete: AWSDate
  secondaryID: String
  accessToStringMap: String
  accessToComplete: String
}

in my appsync API

createinquiry has this:

    createInquiry(input: CreateInquiryInput!, condition: ModelInquiryConditionInput): Inquiry
        @aws_api_key
@aws_iam

input CreateInquiryInput {
    id: ID
    status: InquiryStatus
    customerName: String
    productcategoryidID: ID
    email: String
    phone: String
    address: String
    postNumber: String
    comments: String
    buildingType: BuildingType
    files: [String]
    solintegraID: String
    organizationID: ID
    customerContactDate: AWSDate
    buildingDetails: BuildingDetailsInput
    fuseBox: FuseBoxInput
    offer: LeadOfferInput
    acceptedOffer: AcceptedLeadOfferInput
    origin: String
    statusCreatedDate: AWSDate
    statusPartnAcceptedDate: AWSDate
    statusFirstOfferDate: AWSDate
    statusPlanningDate: AWSDate
    statusRoofDesignDate: AWSDate
    statusLastOfferDate: AWSDate
    statusOfferAcceptedDate: AWSDate
    statusLastAction: AWSDate
    statusAssignedPartnerDate: AWSDate
    statusComplete: AWSDate
    secondaryID: String
    accessToStringMap: String
    accessToComplete: String
    _version: Int
}

input ModelInquiryConditionInput {
    status: ModelInquiryStatusInput
    customerName: ModelStringInput
    productcategoryidID: ModelIDInput
    email: ModelStringInput
    phone: ModelStringInput
    address: ModelStringInput
    postNumber: ModelStringInput
    comments: ModelStringInput
    buildingType: ModelBuildingTypeInput
    files: ModelStringInput
    solintegraID: ModelStringInput
    organizationID: ModelIDInput
    customerContactDate: ModelStringInput
    origin: ModelStringInput
    statusCreatedDate: ModelStringInput
    statusPartnAcceptedDate: ModelStringInput
    statusFirstOfferDate: ModelStringInput
    statusPlanningDate: ModelStringInput
    statusRoofDesignDate: ModelStringInput
    statusLastOfferDate: ModelStringInput
    statusOfferAcceptedDate: ModelStringInput
    statusLastAction: ModelStringInput
    statusAssignedPartnerDate: ModelStringInput
    statusComplete: ModelStringInput
    secondaryID: ModelStringInput
    accessToStringMap: ModelStringInput
    accessToComplete: ModelStringInput
    and: [ModelInquiryConditionInput]
    or: [ModelInquiryConditionInput]
    not: ModelInquiryConditionInput
    _deleted: ModelBooleanInput
    createdAt: ModelStringInput
    updatedAt: ModelStringInput
}
ErikHochweller commented 3 months ago

just an update here.

when i run the node function i get as a result the correct fields, so i believe the function is working correctly.

Then my thoughts tend to datastore as the underlying bit should be the same (and its datastore that throws the message)

ykethan commented 3 months ago

Hey,👋 thanks for raising this! I'm going to transfer this over to our codegen repository for better assistance 🙂.

dpilch commented 3 months ago

For your first issue please refer to this comment on a similar issue: https://github.com/aws-amplify/amplify-category-api/issues/1338#issuecomment-1471896343

I'm not certain on the second issue. I found this thread with a similar issue. https://github.com/aws-amplify/amplify-js/issues/8738

ErikHochweller commented 3 months ago

ok i figured out that i wasnt sending the 4 requested item when creating a new inquiry... now the message is gone, still have the API key issue though

dpilch commented 3 months ago

Have you tried the suggestion in https://github.com/aws-amplify/amplify-js/issues/8738#issuecomment-901276845?

dpilch commented 2 months ago

This issue is being closed due to inactivity. If you are still experiencing the same problem and need further assistance, please feel free to leave a comment. This will enable us to reopen the issue and provide you with the necessary support.

github-actions[bot] commented 2 months ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.