analyzePortalSiteSource

Topics: Surfaces

Read, compile and type-check a Portal site document without saving it. Returns valid; diagnostics (each with the model path, message, severity error or warning, and the original sourceRange); projection, the document in its model shape; pages, keyed by page pointer (/pages/0), with each page's server Lua exports in source order, so an editor can offer a handler for an export that has none; components, each site component's security and events with their inferred input and output schemas; and locations, source ranges by model pointer.

Returns

JSON!

Arguments

Complete Portal site document XML to analyze without saving or publishing it.

Exact field SDL
"""
Read, compile and type-check a Portal site document without saving it. Returns `valid`; `diagnostics` (each with the model `path`, `message`, `severity` error or warning, and the original `sourceRange`); `projection`, the document in its model shape; `pages`, keyed by page pointer (`/pages/0`), with each page's server Lua `exports` in source order, so an editor can offer a handler for an export that has none; `components`, each site component's `security` and `events` with their inferred input and output schemas; and `locations`, source ranges by model pointer.
"""
analyzePortalSiteSource(
  """
  Complete Portal site document XML to analyze without saving or publishing it.
  """
  sourceXML: String!
): JSON! @topic(names: ["surfaces"])

Declared on Query. Access is checked by the platform for each operation.