Closed
Conversation
- Add custom-nodes/js/subgraphs.mdx — primary developer guide covering node ID types, recursive traversal, subgraph events, widget promotion, cleanup patterns (AbortController), and known limitations - Add custom-nodes/backend/subgraphs.mdx — backend guide for UNIQUE_ID behavior inside subgraphs - Update docs.json navigation for both pages - Add cross-links from expansion.mdx and subgraph.mdx Fixes #724 Amp-Thread-ID: https://ampcode.com/threads/T-019c3604-fb97-775b-baea-5ecf94822c8e
christian-byrne
added a commit
that referenced
this pull request
Feb 7, 2026
Rewrite custom-nodes/js/subgraphs.mdx to be actionable and snippet-focused:
- Remove all internal module imports (@/utils/*, @/types/*, @/core/*)
- Add copy-paste walkGraph helper for recursive traversal
- Use plain JS with import { app } style matching other JS docs
- Add complete working examples for events, cleanup, widget promotion
- Add known limitations section
Incorporate best parts from PR #751:
- Add custom-nodes/backend/subgraphs.mdx (UNIQUE_ID in subgraphs)
- Add cross-links on expansion.mdx and subgraph.mdx
- Add backend nav entries in docs.json (EN + zh-CN)
- Move JS subgraphs before javascript_examples in nav
Closes #724
Amp-Thread-ID: https://ampcode.com/threads/T-019c3603-c29b-70c4-b6a1-9c2dd385475f
Contributor
Author
|
Consolidated into #750 which includes the best content from both PRs: snippet-focused JS guide (no internal imports), backend Python subgraphs page, cross-links, and zh-CN stubs. |
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.
Summary
Add a comprehensive developer guide for working with subgraphs programmatically in ComfyUI extensions, plus a companion backend guide for Python node authors.
Changes
custom-nodes/js/subgraphs.mdx— Primary developer guide covering:CustomEventTargetevents table)AbortController-based cleanup patternscustom-nodes/backend/subgraphs.mdx— Backend guide onUNIQUE_IDbehavior inside subgraphs and execution flatteningdocs.json— Navigation entries for both pagescustom-nodes/backend/expansion.mdx— Related links sectioninterface/features/subgraph.mdx— Cross-link Tip to the developer guideReview Focus
Fixes #724