Skip to content

fix: remove unsupported Query.select causing invalid queries param (#2916)#2919

Open
bugbotbyte wants to merge 2 commits intoappwrite:mainfrom
bugbotbyte:fix-2916-invalid-query-param
Open

fix: remove unsupported Query.select causing invalid queries param (#2916)#2919
bugbotbyte wants to merge 2 commits intoappwrite:mainfrom
bugbotbyte:fix-2916-invalid-query-param

Conversation

@bugbotbyte
Copy link

@bugbotbyte bugbotbyte commented Mar 16, 2026

What does this PR do?

Fixes the "Invalid queries param: Invalid query method: select" error when listing projects.

This occurs because Query.select() is not supported for the /projects endpoint in Appwrite 1.8.

Changes

  • Removed unsupported Query.select(['$id']) from the projects query in +layout.ts
  • Added invalidate(Dependencies.ORGANIZATION) after project creation to refresh the project list so the new project appears immediately

Related Issue

Closes #2916

Summary by CodeRabbit

  • Bug Fixes

    • Newly created projects now appear immediately in the project list without requiring a manual refresh.
  • Improvements

    • Added an automatic refresh of organization data after project creation with graceful error handling to ensure tracking and user flow continue even if the refresh fails.

@appwrite
Copy link

appwrite bot commented Mar 16, 2026

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Queued Queued Authorize Preview URL QR Code

Tip

HTTPS and SSL certificates are handled automatically for all your Sites

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0c6e29e9-36de-4978-9e0d-595fc132d46f

📥 Commits

Reviewing files that changed from the base of the PR and between 1da344e and 8a22af5.

📒 Files selected for processing (1)
  • src/routes/(console)/organization-[organization]/createProject.svelte
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/routes/(console)/organization-[organization]/createProject.svelte

Walkthrough

The pull request updates two console-route files. In +layout.ts the project list query was simplified to call sdk.forConsole.projects.list with limit(1) only, removing the previous select(['$id']). In createProject.svelte an invalidate(Dependencies.ORGANIZATION) call (from $app/navigation) was added after dispatching the created event; the invalidate is wrapped in a try/catch and errors are tracked before continuing to track the creation event.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing Query.select from the projects query to fix the invalid queries parameter error.
Linked Issues check ✅ Passed The PR addresses all coding requirements from issue #2916: removes unsupported Query.select() from projects endpoint and adds invalidate() after project creation to ensure newly created projects appear immediately.
Out of Scope Changes check ✅ Passed All changes are directly related to the issue objectives: removing Query.select from projects query and adding invalidation after project creation to fix the reported problem.
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 unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

You can make CodeRabbit's review stricter and more nitpicky using the `assertive` profile, if that's what you prefer.

Change the reviews.profile setting to assertive to make CodeRabbit's nitpick more issues in your PRs.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/routes/`(console)/organization-[organization]/createProject.svelte:
- Line 39: The invalidate call after creating a project (await
invalidate(Dependencies.ORGANIZATION)) can throw and currently lives inside the
same try that reports mutation success/failure; move it out or wrap it in its
own try/catch so invalidate errors don’t trigger the main catch and incorrectly
mark project creation as failed—specifically adjust the code around the
mutation/try block in createProject.svelte to handle the mutation success
separately from calling invalidate(Dependencies.ORGANIZATION), and log or ignore
errors from invalidate without rethrowing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f7c73f00-fddd-4a06-8e35-de4859f1d8df

📥 Commits

Reviewing files that changed from the base of the PR and between f6b5c27 and 1da344e.

📒 Files selected for processing (2)
  • src/routes/(console)/+layout.ts
  • src/routes/(console)/organization-[organization]/createProject.svelte

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.

Invalid queries param: Invalid query method

1 participant