From 42a5e84fb71d5a19ad89beb9d845ec2c37d5538f Mon Sep 17 00:00:00 2001 From: psteinroe Date: Sun, 14 Jul 2024 18:03:14 +0200 Subject: [PATCH] chore: docs --- docs/pages/postgrest/queries.mdx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/pages/postgrest/queries.mdx b/docs/pages/postgrest/queries.mdx index 3adc32c0..f7cbfc87 100644 --- a/docs/pages/postgrest/queries.mdx +++ b/docs/pages/postgrest/queries.mdx @@ -2,14 +2,6 @@ import { Callout, Tabs, Tab } from "nextra-theme-docs"; # Queries - - Unfortunately, we require you to be explicit in the select statement fields, - and not use a wildcard ('*'), since mutations need to know the columns to - derive whether the query cache should be updated with new values. Note that - the wildcard selector is not allowed on any level, so you can't use it for - relations either. - - The cache helpers query hooks wrap the data fetching hooks of the cache libraries and pass both the cache key and the fetcher function from on the PostgREST query. This is enabled primarily by a parser that turns any Supabase PostgREST query into a definite cache key. For example, ```ts @@ -32,6 +24,13 @@ is parsed into + + Although you can use wildcards (`*`) in your query, their usages are only + recommended for `head: true` and `count: true` queries. For any other query, + you should be explicit about the columns you want to select. Only then is + cache helpers able to do granular cache updates without refetching. + + ## `useQuery` Wrapper around the default data fetching hook that returns the query including the count without any modification of the data. The config parameter of the respective library can be passed as the second argument.