# effectivePolicyForNode

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

@shumoku/core · 0.4.0 · function

# effectivePolicyForNode

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

APIの説明は英語のcanonical sourceを表示しています。

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
```

## パラメーター

| 名前 | 型 | 説明 | 既定値 |
| --- | --- | --- | --- |
| `graph` | `Pick<NetworkGraph, "subgraphs" | "attachments">` | 追加説明はありません。 | `—` |
| `node` | `Pick<Node, "attachments" | "parent">` | 追加説明はありません。 | `—` |

## 戻り値

```
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)
