This repository was archived by the owner on Jun 23, 2026. It is now read-only.
feat: add board (dashboard) CRUD commands - #6
Open
beengud wants to merge 1 commit into
Open
Conversation
* feat: add board (dashboard) command and object type * fix: board list workspaceId must be array type [ObjectId!] * fix: strip read-only fields (updatedDate) from board input before saveDashboard mutation The Observe API returns updatedDate in board responses but does not accept it in the DashboardInput type. Sending it causes GRAPHQL_VALIDATION_FAILED. * fix: normalize missing stage input to [] for DashboardStageInput GraphQL type The saveDashboard mutation requires stages[n].input to be defined. Pure pipeline stages (no dataset input) omit the field entirely, causing GRAPHQL_VALIDATION_FAILED. Default missing input to empty array. * feat: enhance board list with dashboardSearch and add set/clear-default commands Adds --name and --folder flags to `observe list board` to trigger dashboardSearch with filter terms instead of the plain workspace list. The global --workspace flag (cfg.WorkspaceIdOrName) is used as the workspace filter when search is active. Adds `observe board set-default <dataset-id> <board-id>` and `observe board clear-default <dataset-id>` subcommands using setDefaultDashboard / clearDefaultDashboard mutations. Includes unit tests in cmd_board_search_test.go covering: - Plain list (no flags) uses dashboards field - Name filter triggers dashboardSearch results field - Workspace-via-config passes through to search terms - Folder filter triggers dashboardSearch - Empty results produces header-only output - unpackBoardItems helper tested directly Closes #10 Closes #12 --------- Co-authored-by: Aaron Brewbaker <abrewbaker@nhl.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Adds a full suite of
observe boardsubcommands for managing Observe dashboards programmatically:observe list boardobserve get board <id>observe board create <file.json>observe board update <id> <file.json>observe board scaffold <dsid>observe delete board <id>observe board set-default <dsid> <bid>observe board clear-default <dsid>Bug fixes included
Three bugs were found and fixed while implementing this:
workspaceIdarray type —listBoardsquery requiresworkspaceId: [ObjectId!]!(array), not a scalarupdatedDatefield — thesaveDashboardmutation rejectsupdatedDate; strip it from input before sendingstage.input—DashboardStageInputrequiresinput: []to be present (not null/absent); normalize missing values to[]Files
cmd_board.go— CLI command handlersot_board.go— GraphQL operations (listBoards, getDashboard, saveDashboard, deleteDashboard, setDefaultBoard, clearDefaultBoard)docs/board.md— usage documentationcmd_board_search_test.go— unit tests for board list filtering