Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New useSupabaseQuery to simplify fetching (like useAsyncData) #448

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dan-hale
Copy link

@dan-hale dan-hale commented Jan 10, 2025

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Wrapping every request in useAsyncData is cumbersome. This new API would allow developers to easily passthrough their query to Postgres-JS, and have a type safe, reactive, SSR friendly value returned. The approach is inspired by useAsyncData.

Resolves #443

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

Copy link

netlify bot commented Jan 10, 2025

👷 Deploy request for n3-supabase pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 283f6c2

@dan-hale dan-hale marked this pull request as draft January 10, 2025 04:17
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.

Add asAsyncData helper method for fluent Promises (e.g., Postgrest-js) integration
1 participant