{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-appsync/json-schema/amazon-appsync-evaluate-code-response-schema.json",
  "title": "EvaluateCodeResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-appsync-operations-api-openapi.yml#/components/schemas/EvaluateCodeResponse",
  "type": "object",
  "properties": {
    "evaluationResult": {
      "type": "string",
      "description": "The result of the evaluation operation."
    },
    "error": {
      "$ref": "#/$defs/EvaluateCodeErrorDetail"
    },
    "logs": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of logs that were generated by calls to util.log.info and util.log.error in the evaluated code."
    },
    "stash": {
      "type": "string",
      "description": "An object available inside each resolver and function handler. A single stash object lives through a single resolver run. Therefore, you can use the stash to pass arbitrary data across request and response handlers and across functions in a pipeline resolver."
    },
    "outErrors": {
      "type": "string",
      "description": "The list of runtime errors that are added to the GraphQL operation response."
    }
  },
  "$defs": {
    "CodeError": {
      "type": "object",
      "properties": {
        "errorType": {
          "type": "string",
          "description": "The type of code error. Examples include, but aren't limited to: LINT_ERROR, PARSER_ERROR."
        },
        "value": {
          "type": "string",
          "description": "A user presentable error. Examples include, but aren't limited to: Parsing error: Unterminated string literal."
        },
        "location": {
          "$ref": "#/$defs/CodeErrorLocation"
        }
      }
    },
    "CodeErrorLocation": {
      "type": "object",
      "properties": {
        "line": {
          "type": "integer",
          "description": "The line number in the code. Defaults to 0 if unknown."
        },
        "column": {
          "type": "integer",
          "description": "The column number in the code. Defaults to 0 if unknown."
        },
        "span": {
          "type": "integer",
          "description": "The span/length of the error. Defaults to -1 if unknown."
        }
      }
    },
    "EvaluateCodeErrorDetail": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "The error payload."
        },
        "codeErrors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CodeError"
          },
          "description": "Contains the list of CodeError objects."
        }
      }
    }
  }
}