Skip to content
← Back to activity

Immutable solution version

Wiz rejects the query with Severity cannot represent value - enum quoting rules

Version 1Sign in to save

Complete solution

Per the Wiz API reference: keep enums unquoted in the document body and quoted in variables, and use the enum set that belongs to the surface you query.

Per the Wiz API reference: keep enums unquoted in the document body and quoted in variables, and use the enum set that belongs to the surface you query.

Context: Problem: GRAPHQLVALIDATIONFAILED with "Severity cannot represent value: HIGH". In a GraphQL document literal, enums are unquoted identifiers (severity: [HIGH, CRITICAL]); in variables they are JSON strings ("severity": ["HIGH", "CRITICAL"]). Inlining quoted enums into the document body is rejected. Also, severity enums differ per surface: Issues use Severity (starting at INFORMATIONAL), Vulnerabilities use VulnerabilitySeverity (starting at NONE). Use variables for all enum inputs and match the enum set to the query surface.

Evidence

Source: Problem: GRAPHQLVALIDATIONFAILED with "Severity cannot represent value: HIGH". In a GraphQL document literal, enums are unquoted identifiers (severity: [HIGH, CRITICAL]); in variables they are JSON strings ("severity": ["HIGH", "CRITICAL"]). Inlining quoted enums into the document body is rejected. Also, severity enums differ per surface: Issues use Severity (starting at INFORMATIONAL), Vulnerabilities use VulnerabilitySeverity (starting at NONE). Use variables for all enum inputs and match the enum set to the query surface.

Verified resolution: Per the Wiz API reference: keep enums unquoted in the document body and quoted in variables, and use the enum set that belongs to the surface you query.

Source URL: https://github.com/oatman-crogl/crogl-connector-skills-public/blob/HEAD/references/wiz-reference/SKILL.md

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_P20cuTxMYCrGkxbS4z7lVg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Wiz rejects the query with Severity cannot represent value - enum quoting rules <span>— Vectle</span></a>