{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-experience-cloud/json-schema/salesforce-experience-cloud-graph-qlresponse-schema.json",
  "title": "GraphQLResponse",
  "description": "Response from a GraphQL query execution",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-experience-cloud-graph-ql-api-openapi.yml#/components/schemas/GraphQLResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "description": "The data returned by the query. Structure mirrors the query shape. Contains a uiapi root object with query results.",
      "properties": {
        "uiapi": {
          "type": "object",
          "description": "Root UIAPI namespace",
          "properties": {
            "query": {
              "type": "object",
              "description": "Contains the query results keyed by object name. Each object result uses Relay-style pagination with edges and nodes.",
              "additionalProperties": {
                "$ref": "#/$defs/GraphQLConnection"
              }
            }
          }
        }
      },
      "additionalProperties": true
    },
    "errors": {
      "type": "array",
      "description": "Errors encountered during query execution. Present alongside data if some fields failed but others succeeded.",
      "items": {
        "$ref": "#/$defs/GraphQLError"
      }
    },
    "extensions": {
      "type": "object",
      "description": "Extension data provided by the server, including query cost and performance metrics.",
      "additionalProperties": true
    }
  },
  "$defs": {
    "GraphQLConnection": {
      "type": "object",
      "description": "A Relay-style connection containing edges (records) and pagination information",
      "properties": {
        "edges": {
          "type": "array",
          "description": "List of edges containing record nodes",
          "items": {
            "$ref": "#/$defs/GraphQLEdge"
          }
        },
        "pageInfo": {
          "type": "object",
          "description": "Pagination information",
          "properties": {
            "hasNextPage": {
              "type": "boolean",
              "description": "Whether more pages are available"
            },
            "hasPreviousPage": {
              "type": "boolean",
              "description": "Whether previous pages exist"
            },
            "startCursor": {
              "type": "string",
              "description": "Cursor for the first edge"
            },
            "endCursor": {
              "type": "string",
              "description": "Cursor for the last edge"
            }
          }
        },
        "totalCount": {
          "type": "integer",
          "description": "Total number of matching records"
        }
      }
    },
    "GraphQLEdge": {
      "type": "object",
      "description": "An edge in a Relay-style connection containing a node",
      "properties": {
        "cursor": {
          "type": "string",
          "description": "Cursor for this edge (used for pagination)"
        },
        "node": {
          "type": "object",
          "description": "The record node containing field values. Each field returns an object with value and optional displayValue properties.",
          "properties": {
            "Id": {
              "type": "string",
              "description": "Record ID"
            }
          },
          "additionalProperties": {
            "$ref": "#/$defs/GraphQLFieldValue"
          }
        }
      }
    },
    "GraphQLError": {
      "type": "object",
      "description": "A GraphQL error",
      "properties": {
        "message": {
          "type": "string",
          "description": "Human-readable error message"
        },
        "locations": {
          "type": "array",
          "description": "Locations in the query where the error occurred",
          "items": {
            "type": "object",
            "properties": {
              "line": {
                "type": "integer"
              },
              "column": {
                "type": "integer"
              }
            }
          }
        },
        "path": {
          "type": "array",
          "description": "Path to the field that caused the error",
          "items": {
            "type": "string"
          }
        },
        "extensions": {
          "type": "object",
          "description": "Additional error details",
          "properties": {
            "errorCode": {
              "type": "string"
            },
            "classification": {
              "type": "string"
            }
          },
          "additionalProperties": true
        }
      }
    },
    "GraphQLFieldValue": {
      "type": "object",
      "description": "A field value in a GraphQL response, providing both raw value and locale-formatted display value",
      "properties": {
        "value": {
          "description": "Raw field value"
        },
        "displayValue": {
          "type": "string",
          "description": "Formatted display value (locale-aware)"
        }
      }
    }
  }
}