Skip to content

[Docs] Add docs for cli query#2396

Merged
nezaj merged 4 commits intomainfrom
cli-query-docs
Mar 20, 2026
Merged

[Docs] Add docs for cli query#2396
nezaj merged 4 commits intomainfrom
cli-query-docs

Conversation

@nezaj
Copy link
Contributor

@nezaj nezaj commented Mar 20, 2026

What it says on the tin!

CleanShot 2026-03-20 at 13 56 48@2x

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 20, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 29098309-e54e-4ff7-90df-21a5023872a8

📥 Commits

Reviewing files that changed from the base of the PR and between cc67cf5 and 38646c7.

📒 Files selected for processing (4)
  • client/packages/cli/__tests__/e2e/cli.e2e.test.ts
  • client/packages/cli/src/index.js
  • client/packages/version/src/version.ts
  • client/www/pages/docs/cli.md

📝 Walkthrough

Walkthrough

Removed explicit error for missing auth context in the CLI query handler; added docs for npx instant-cli@latest query; updated CLI e2e test to use implicit admin context and seed data; bumped package version constant.

Changes

Cohort / File(s) Summary
CLI docs
client/www/pages/docs/cli.md
Added a new "Query" section documenting npx instant-cli@latest query (JSON/JSON5 input, JSON stdout, auth flags, example, relationship cardinality behavior).
CLI command logic
client/packages/cli/src/index.js
Removed the explicit validation/error path for zero auth-context flags in handleQuery (keeps existing mutual-exclusion check for multiple contexts).
CLI tests
client/packages/cli/__tests__/e2e/cli.e2e.test.ts
Updated e2e test to provision schema, push, insert admin-created data, and assert successful query output (expects one post titled "Hello") instead of asserting a missing-context error.
Version bump
client/packages/version/src/version.ts
Updated exported version constant from 'v0.22.166' to 'v0.22.167'.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • stopachka
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title '[Docs] Add docs for cli query' directly and clearly summarizes the main change: adding documentation for the CLI query feature.
Description check ✅ Passed The description 'What it says on the tin!' with a screenshot is minimally related to the changeset and confirms the documentation addition without providing detailed context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cli-query-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@stopachka stopachka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SG!

@github-actions
Copy link
Contributor

View Vercel preview at instant-www-js-cli-query-docs-jsv.vercel.app.

@nezaj nezaj merged commit 7de3967 into main Mar 20, 2026
8 checks passed
@nezaj nezaj deleted the cli-query-docs branch March 20, 2026 21:13
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