Reason: 'createdAt' Expected non-null value, found null


I’m having the same issue, althought I wrote correct field name: createdAt. Here is my datamodel.prisma:

type Link {
  id: ID! @id
  createdAt: DateTime!
  updatedAt: DateTime!
  description: String!
  url: String!

My mutation:

mutation {
    url: ""
    description: "Prisma replaces traditional ORMs"
  ) {

Prisma version: 1.28.0


  "data": null,
  "errors": [
      "message": "Variable '$data' expected value of type 'LinkCreateInput!' but got: {\"url\":\"\",\"description\":\"Prisma replaces traditional ORMs\"}. Reason: 'createdAt' Expected non-null value, found null. (line 1, column 11):\nmutation ($data: LinkCreateInput!) {\n          ^",
      "locations": [
          "line": 2,
          "column": 3
      "path": [

Please help me!




We need the directives of CreatedAt and UpdatedAt. Here for example in datamodel.prisma:

type User {
  id: ID! @id
  name: String!
  email: String! @unique
  createdAt: DateTime! @createdAt
  updatedAt: DateTime! @updatedAt


Thanks for your help! It solved my problem.


You’re welcome. You could mark my answer as solved. So other can see that this thread is solved. Thanks.


This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.