---
title: RuleFunctionOpa type | Wartiva GraphQL API
description: A RuleFunction that implements its policy logic using OPA Rego code. Wartiva GraphQL API reference with arguments, fields, and examples.
url: https://wartiva.com/api-docs/types/rule-function-opa.html
updated: 2026-10-07
---

Policies and findings · GraphQL type

# `RuleFunctionOpa` type

A RuleFunction that implements its policy logic using OPA Rego code.

## Fields

| Field Name | Description |
|---|---|
| `opaPolicy` - [`String!`](https://wartiva.com/api-docs/types/string.html) | OPA Rego policy that implements the rule logic. |

## Used by

- [`RuleFunction`](https://wartiva.com/api-docs/types/rule-function.html) union: A polymorphic rule function that implements the rule logic.

## Example

### Example

```json
{"opaPolicy": "abc123"}

```

---

Wartiva is in early access. Request access: https://wartiva.com/early-access.html  
All pages: https://wartiva.com/llms.txt
