diff --git a/.changeset/clean-rules-itch.md b/.changeset/clean-rules-itch.md
index 2e5c429e62..0529b20df1 100644
--- a/.changeset/clean-rules-itch.md
+++ b/.changeset/clean-rules-itch.md
@@ -2,4 +2,4 @@
'houdini': patch
---
-in queries when we have manual_load directive fetching is false by default otherwise true
+in queries when we have a manual load, fetching is false by default otherwise true
diff --git a/.changeset/shaggy-clocks-retire.md b/.changeset/shaggy-clocks-retire.md
new file mode 100644
index 0000000000..a5ca70e79c
--- /dev/null
+++ b/.changeset/shaggy-clocks-retire.md
@@ -0,0 +1,5 @@
+---
+'houdini-svelte': major
+---
+
+Removed `@manual_load` since queries defined inline in a component are no longer automatically loaded. In order to opt into generated loads for your inline queries, use the `@load` directive
diff --git a/.changeset/swift-buttons-nail.md b/.changeset/swift-buttons-nail.md
new file mode 100644
index 0000000000..7e9b2920dd
--- /dev/null
+++ b/.changeset/swift-buttons-nail.md
@@ -0,0 +1,5 @@
+---
+'houdini': minor
+---
+
+Restructure programmatic cache api
diff --git a/e2e/sveltekit/src/lib/QueryComponent.svelte b/e2e/sveltekit/src/lib/QueryComponent.svelte
index 05fd9c430d..9c13dab05c 100644
--- a/e2e/sveltekit/src/lib/QueryComponent.svelte
+++ b/e2e/sveltekit/src/lib/QueryComponent.svelte
@@ -11,7 +11,7 @@
export let id = '';
const result = graphql(`
- query FragmentQueryVars($id: ID!) {
+ query FragmentQueryVars($id: ID!) @load {
user(id: $id, snapshot: "preprocess-query-variable") {
name
}
diff --git a/e2e/sveltekit/src/lib/QueryExtNoAutoFetch.svelte b/e2e/sveltekit/src/lib/QueryExtNoAutoFetch.svelte
index 81f48875ec..625ded1455 100644
--- a/e2e/sveltekit/src/lib/QueryExtNoAutoFetch.svelte
+++ b/e2e/sveltekit/src/lib/QueryExtNoAutoFetch.svelte
@@ -2,7 +2,7 @@
import { graphql } from '$houdini';
const store = graphql(`
- query QueryExtNoAutoFetch @manual_load {
+ query QueryExtNoAutoFetch {
usersList(limit: 3, snapshot: "QueryExtNoAutoFetch") {
id
name
diff --git a/e2e/sveltekit/src/routes/+layout.svelte b/e2e/sveltekit/src/routes/+layout.svelte
index 636488d608..d5c192a767 100644
--- a/e2e/sveltekit/src/routes/+layout.svelte
+++ b/e2e/sveltekit/src/routes/+layout.svelte
@@ -18,7 +18,7 @@
});
const info = graphql(`
- query LayoutSession {
+ query LayoutSession @load {
session
}
`);
diff --git a/e2e/sveltekit/src/routes/fetching/route_1/+page.svelte b/e2e/sveltekit/src/routes/fetching/route_1/+page.svelte
index 35209062ec..701cb20de4 100644
--- a/e2e/sveltekit/src/routes/fetching/route_1/+page.svelte
+++ b/e2e/sveltekit/src/routes/fetching/route_1/+page.svelte
@@ -2,7 +2,7 @@
import { graphql } from '$houdini';
const store = graphql(`
- query fetching_route_1 {
+ query fetching_route_1 @load {
user(id: 1, snapshot: "fetching_route_1", delay: 200) {
id
name
diff --git a/e2e/sveltekit/src/routes/fetching/with_load/+page.svelte b/e2e/sveltekit/src/routes/fetching/with_load/+page.svelte
index 3645774230..33cc657691 100644
--- a/e2e/sveltekit/src/routes/fetching/with_load/+page.svelte
+++ b/e2e/sveltekit/src/routes/fetching/with_load/+page.svelte
@@ -2,7 +2,7 @@
import { graphql } from '$houdini';
const store = graphql(`
- query fetching_w {
+ query fetching_w @load {
user(id: 1, snapshot: "fetching_w", delay: 200) {
id
name
diff --git a/e2e/sveltekit/src/routes/fetching/without_load/+page.svelte b/e2e/sveltekit/src/routes/fetching/without_load/+page.svelte
index 88b4fbd9ac..ce1a41469b 100644
--- a/e2e/sveltekit/src/routes/fetching/without_load/+page.svelte
+++ b/e2e/sveltekit/src/routes/fetching/without_load/+page.svelte
@@ -1,8 +1,8 @@
-```
## Manual Loading
@@ -438,7 +419,7 @@ equivalent of the load function.
}
const store = graphql(`
- query MyComponentQuery($id: ID!) {
+ query MyComponentQuery($id: ID!) @load {
user(id: $id) {
id
}
@@ -449,6 +430,9 @@ equivalent of the load function.
{$store.data.value}
```
+Using the `@load` directive instructs Houdini to load that query automatically by generating
+the appropriate `load` function.
+
## Endpoints
Using a query store inside of an endpoint looks very similar to the `load` function: just pass the event you
diff --git a/site/src/routes/api/welcome/+page.svx b/site/src/routes/api/welcome/+page.svx
index 35bfbd5b75..efba59f3b2 100644
--- a/site/src/routes/api/welcome/+page.svx
+++ b/site/src/routes/api/welcome/+page.svx
@@ -60,17 +60,17 @@ const subscriptionExample = `graphql(\`
\`)`
const cacheExample = `
- const user = cache.get("User", {
- id: 3
+ const user = cache.get("User", {
+ id: 3
})
- user.writeFragment({
+ user.write({
fragment: graphql(\`
- fragment Update on User {
+ fragment Update on User {
firstName
}
- \`),
- data: {
+ \`),
+ data: {
firstName: "Harry"
}
})
diff --git a/site/src/routes/guides/release-notes/+page.svx b/site/src/routes/guides/release-notes/+page.svx
index e1a80c2ced..af53f17a3e 100644
--- a/site/src/routes/guides/release-notes/+page.svx
+++ b/site/src/routes/guides/release-notes/+page.svx
@@ -13,7 +13,9 @@ description: A guide to migrating your application to each breaking version of h
It's finally here!