# effectivePolicyForNode

Canonical: https://docs.shumoku.dev/en/library/api/effectivePolicyForNode
Language: en

@shumoku/core · 0.4.0 · function

# effectivePolicyForNode

[Source](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/observation/discovery-policy.ts#L187)

Convenience: compute the effective discovery policy for a node in the context of a full \`NetworkGraph\`. Walks the graph 's subgraphs once into a lookup map, then delegates to \`computeEffectivePolicy\`. The resolver, the scheduler, and the API "GET effective policy for this node" surface all need the same answer; they call this helper.

```
effectivePolicyForNode(graph: Pick<NetworkGraph, "subgraphs" | "attachments">, node: Pick<Node, "attachments" | "parent">): EffectiveDiscoveryPolicy
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `graph` | `Pick<NetworkGraph, "subgraphs" | "attachments">` | No additional description. | `—` |
| `node` | `Pick<Node, "attachments" | "parent">` | No additional description. | `—` |

## Returns

```
EffectiveDiscoveryPolicy
```

[`libs/@shumoku/core/src/observation/discovery-policy.ts:187`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/observation/discovery-policy.ts#L187)
