Skip to content

Rename typed node constructor config parameter to data #47

@WH-2099

Description

@WH-2099

Summary

Direct node instantiation now accepts typed *NodeData payloads, but the constructor keyword is still named config. That name no longer matches the value being passed.

Problem

After the node initialization refactor in #38 and PR #39, code such as HttpRequestNode(node_id=..., config=HttpRequestNodeData(...)) treats a typed node data object as config. The type and the keyword point at different concepts:

  • node_config is still the outer raw graph payload with {id, data}
  • the constructor argument is the inner typed node data payload

This makes direct instantiation less clear, especially in nodes that already have real *_config collaborators such as http_request_config.

Proposed Change

Rename the constructor keyword from config to data for Node.__init__ and the concrete node subclasses that now accept typed node data instances.

Scope

  • update Node.__init__ and concrete node subclasses
  • update direct instantiation call sites in examples and tests
  • keep raw graph boundary types such as NodeConfigDict unchanged

Context

This is a follow-up to #38 and PR #39 rather than a duplicate of them.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions