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
Run the application in local development mode and check your network tab after creating a todo. You should see a successful request to a `/graphql` endpoint.
442
437
443
438
<Callout>
@@ -448,10 +443,7 @@ Try playing around with the code completion of `.update(...)` and `.delete(...)`
448
443
</InlineFilter>
449
444
450
445
<InlineFilterfilters={["angular"]}>
451
-
452
-
Let's first add a button to create a new todo item. To make a "create Todo" API request, generate the data client using `generateClient()` in your frontend code, and then call `.create()` operation for the Todo model. The Data client is a fully typed client that gives you in-IDE code completion. To enable this in-IDE code completion capability, pass in the `Schema` type to the `generateClient` function.
Now try to open your app in two browser windows and see how creating a todo in one window automatically adds the todo in the second window as well.
1124
-
1125
-
<Callout>
1126
-
1127
-
You can also use `.onCreate`, `.onUpdate`, or `.onDelete` to subscribe to specific events. Review [Subscribe to real-time events](/[platform]/build-a-backend/data/subscribe-data) to learn more about subscribing to specific mutation events.
1128
-
1129
-
</Callout>
1130
-
1131
1108
</InlineFilter>
1132
1109
1133
1110
<InlineFilterfilters={["angular"]}>
1134
1111
1135
1112
You can also use `observeQuery` to subscribe to a live feed of your backend data. Let's refactor the code to use a real-time observeQuery instead.
0 commit comments