Skip to content

feat(functions): wire get_by_id and update; correct three doc claims - #137

Merged
olavgg merged 1 commit into
mainfrom
feat/functions-endpoint-parity
Sep 18, 2026
Merged

olavgg merged 1 commit into
mainfrom
feat/functions-endpoint-parity

Conversation

@JosteinGj

Copy link
Copy Markdown
Contributor

The api serves GET /functions/{id} and POST /functions/update; neither was in the SDK. Both are now wired, in the async client, the blocking mirror and the Python bindings.

update returns GraphDataWrapper<Node> rather than a flat Resource, because that is what the endpoint echoes and because the flat shape cannot represent a function at all: Resource requires isRoot, which a function does not have, so a flat echo fails to deserialize rather than merely losing fields.

What functions genuinely lack is /byids, /filter and /search — the only node type missing all three. by_ids stays a client-side filter over the listing and its doc now says so rather than calling it a gap "yet".

Three Function doc claims were wrong:

  • related_resources said it was "populated server-side by FunctionService .list()". FunctionTransformer applies the shared node fields and the labels and never joins the edges in, so it is empty on list, on get_by_id and on the create echo — which, unlike /resources/create, is no exception, because it re-reads the rows through that same transformer.
  • name is Option here but the api declares it non-null.
  • delete answers 204 with no body, so the wrapper is always empty.

The live round-trip drives the two new endpoints and asserts the echo is a Node::Function. Its comment also no longer claims it needs a forecast-ema model template — that went away with the functions feature itself.

The api serves `GET /functions/{id}` and `POST /functions/update`; neither was
in the SDK. Both are now wired, in the async client, the blocking mirror and the
Python bindings.

`update` returns `GraphDataWrapper<Node>` rather than a flat `Resource`, because
that is what the endpoint echoes and because the flat shape cannot represent a
function at all: `Resource` requires `isRoot`, which a function does not have,
so a flat echo fails to *deserialize* rather than merely losing fields.

What functions genuinely lack is `/byids`, `/filter` and `/search` — the only
node type missing all three. `by_ids` stays a client-side filter over the
listing and its doc now says so rather than calling it a gap "yet".

Three `Function` doc claims were wrong:

- `related_resources` said it was "populated server-side by FunctionService
  .list()". `FunctionTransformer` applies the shared node fields and the labels
  and never joins the edges in, so it is empty on `list`, on `get_by_id` *and*
  on the create echo — which, unlike `/resources/create`, is no exception,
  because it re-reads the rows through that same transformer.
- `name` is `Option` here but the api declares it non-null.
- `delete` answers 204 with no body, so the wrapper is always empty.

The live round-trip drives the two new endpoints and asserts the echo is a
`Node::Function`. Its comment also no longer claims it needs a `forecast-ema`
model template — that went away with the functions feature itself.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: jgjesdal <jostein@intellistream.ai>
@JosteinGj
JosteinGj requested a review from olavgg September 18, 2026 12:49
@olavgg
olavgg merged commit abc4ba3 into main Sep 18, 2026
18 checks passed
@olavgg
olavgg deleted the feat/functions-endpoint-parity branch September 18, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants