This repository was archived by the owner on Aug 5, 2026. It is now read-only.
feat: add board (dashboard) CRUD commands - #2
Merged
Conversation
…eDashboard mutation The Observe API returns updatedDate in board responses but does not accept it in the DashboardInput type. Sending it causes GRAPHQL_VALIDATION_FAILED.
…hQL 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.
…lt 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
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 board/dashboard management commands:
observe list board— list all dashboards in a workspaceobserve get board <id>— fetch a single dashboard by IDobserve board create <file.json>— create a new dashboard from JSONobserve board update <id> <file.json>— update an existing dashboardobserve board scaffold <dsid>— generate a starter dashboard template for a datasetobserve delete board <id>— delete a dashboardobserve board set-default <dsid> <bid>— set the default board for a datasetobserve board clear-default <dsid>— clear the default board for a datasetBug fixes included
workspaceIdmust use array type[ObjectId!]!in the GraphQL queryupdatedDatefield beforesaveDashboardmutation (API rejects it)stages[n].inputto[](required by schema)Test plan
observe list boardreturns a table of boardsobserve get board <id>returns JSONobserve board scaffold <dsid>generates a valid JSON templateobserve board create <scaffold.json>creates a new boardobserve board update <id> <file.json>updates without 400 errorobserve board set-default <dsid> <bid>/observe board clear-default <dsid>