Coder Social home page Coder Social logo

Cannot return null for non-nullable type: \'AWSDateTime\' within parent (/onUpdateImbybe/createdAt)" about amplify-swift HOT 3 OPEN

jaymeen-unadkat-differenz avatar jaymeen-unadkat-differenz commented on June 12, 2024
Cannot return null for non-nullable type: \'AWSDateTime\' within parent (/onUpdateImbybe/createdAt)"

from amplify-swift.

Comments (3)

lawmicha avatar lawmicha commented on June 12, 2024

Hi @jaymeen-unadkat-differenz, can you provide us with the schema that you used, redacted if needed. Alternatively, you can run

amplify diagnose --send-report

to create a zip of the amplify project which includes the schema. (https://docs.amplify.aws/swift/tools/cli/reference/diagnose/)

Can you also provide us with the code snippet that you are using to perform the save?

Usually createAt and updatedAt are system-level fields on the model, so if you had overridden them in the schema and marked them as required, that may be related to the error you're seeing. We won't know until we have your schema to analyze and reproduce the problem.

from amplify-swift.

jaymeen-unadkat-differenz avatar jaymeen-unadkat-differenz commented on June 12, 2024

@lawmicha
This is the schema which we are using

type Imbybe @model @auth(rules: [{allow: public}]){
  pk: String! @primaryKey(sortKeyFields: ["sk"])
  sk: String!
  gsi1: String @index(sortKeyFields: ["gsisk1"])
  gsisk1: String
  name: String
  description: String
  imageURL: String
  ordersEmail: String
  type: String
  street: String
  city: String
  state: String
  zipCode: Int
  productCost: Int
  productCategory: String
  numberOfDrinks: Int
  publishDate: AWSDateTime
  expirationDate: AWSDateTime
  eligibleZipCodes: [Int]
  numberOfCampaigns: Int
  numberOfOffers: Int
  remainingNumberOfCampaigns: Int
  productQuantity: Int
  primaryProduct: Boolean
  startingNumberOfDrinks: Int
  remainingNumberOfDrinks: Int
  lat: Float
  lng: Float
  operatingHours: AWSJSON
  cognitoID: String
  startingNumberOfOffers: Int
  remainingNumberOfOffers: Int
  campaignStatus: String
  rating: Int
  comment: String
}

from amplify-swift.

lawmicha avatar lawmicha commented on June 12, 2024

Thanks for the schema, any code snippets and logs leading up to that error?

from amplify-swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.