You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/docs/20-core-concepts/60-remote-functions.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -172,6 +172,59 @@ Any query can be re-fetched via its `refresh` method, which retrieves the latest
172
172
173
173
> [!NOTE] Queries are cached while they're on the page, meaning `getPosts() ===getPosts()`. This means you don't need a reference like `constposts=getPosts()` in order to update the query.
174
174
175
+
## query.batch
176
+
177
+
`query.batch` works like `query` except that it batches requests that happen within the same macrotask. This solves the so-called n+1 problem: rather than each query resulting in a separate database call (for example), simultaneous queries are grouped together.
178
+
179
+
On the server, the callback receives an array of the arguments the function was called with. It must return a function of the form `(input:Input, index:number) => Output`. SvelteKit will then call this with each of the input arguments to resolve the individual calls with their results.
The `form` function makes it easy to write data to the server. It takes a callback that receives the current [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)...
Copy file name to clipboardExpand all lines: documentation/docs/25-build-and-deploy/80-adapter-netlify.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ New projects will use the current Node LTS version by default. However, if you'r
50
50
51
51
## Netlify Edge Functions
52
52
53
-
SvelteKit supports [Netlify Edge Functions](https://docs.netlify.com/netlify-labs/experimental-features/edge-functions/). If you pass the option `edge: true` to the `adapter` function, server-side rendering will happen in a Deno-based edge function that's deployed close to the site visitor. If set to `false` (the default), the site will deploy to Node-based Netlify Functions.
53
+
SvelteKit supports [Netlify Edge Functions](https://docs.netlify.com/build/edge-functions/overview/). If you pass the option `edge: true` to the `adapter` function, server-side rendering will happen in a Deno-based edge function that's deployed close to the site visitor. If set to `false` (the default), the site will deploy to Node-based Netlify Functions.
0 commit comments