Prisma · Schema

UpsertInput

Input data for upserting a record

Properties

Name Type Description
where object Unique identifier to search for an existing record
create object Data to use if creating a new record
update object Data to use if updating an existing record
select object Fields to include in the returned record
include object Relations to eagerly load in the returned record
View JSON Schema on GitHub

JSON Schema

prisma-upsertinput-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/UpsertInput",
  "title": "UpsertInput",
  "type": "object",
  "description": "Input data for upserting a record",
  "properties": {
    "where": {
      "type": "object",
      "description": "Unique identifier to search for an existing record",
      "additionalProperties": true
    },
    "create": {
      "type": "object",
      "description": "Data to use if creating a new record",
      "additionalProperties": true
    },
    "update": {
      "type": "object",
      "description": "Data to use if updating an existing record",
      "additionalProperties": true
    },
    "select": {
      "type": "object",
      "description": "Fields to include in the returned record",
      "additionalProperties": {
        "type": "boolean"
      }
    },
    "include": {
      "type": "object",
      "description": "Relations to eagerly load in the returned record",
      "additionalProperties": {
        "type": "boolean"
      }
    }
  },
  "required": [
    "where",
    "create",
    "update"
  ]
}