feat(functions): wire get_by_id and update; correct three doc claims - #137
Merged
Merged
Conversation
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>
olavgg
approved these changes
Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The api serves
GET /functions/{id}andPOST /functions/update; neither was in the SDK. Both are now wired, in the async client, the blocking mirror and the Python bindings.updatereturnsGraphDataWrapper<Node>rather than a flatResource, because that is what the endpoint echoes and because the flat shape cannot represent a function at all:ResourcerequiresisRoot, which a function does not have, so a flat echo fails to deserialize rather than merely losing fields.What functions genuinely lack is
/byids,/filterand/search— the only node type missing all three.by_idsstays a client-side filter over the listing and its doc now says so rather than calling it a gap "yet".Three
Functiondoc claims were wrong:related_resourcessaid it was "populated server-side by FunctionService .list()".FunctionTransformerapplies the shared node fields and the labels and never joins the edges in, so it is empty onlist, onget_by_idand on the create echo — which, unlike/resources/create, is no exception, because it re-reads the rows through that same transformer.nameisOptionhere but the api declares it non-null.deleteanswers 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 aforecast-emamodel template — that went away with the functions feature itself.