Skip to content

Commit

Permalink
Remove model client await from docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zknill committed Oct 20, 2023
1 parent cb5dcde commit d710aa1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ async function updatePost(mutationId: string, content: string) {
}

// create a new model instance called 'post' by passing the sync and merge functions
const model = await modelsClient.models.get<Post>({
const model = modelsClient.models.get<Post>({
name: 'post',
channelName: 'models:posts',
$sync: sync,
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Note that we pass in the shape of our data model (`Post`) as a type parameter.
In order to instantiate the model, we need to pass some *registrations* which link up the model to your application code.

```ts
const model = await modelsClient.models.get<Post>({
const model = modelsClient.models.get<Post>({
name: /* ... */,
channelName: /* ... */,
$sync: /* ... */,
Expand Down Expand Up @@ -58,7 +58,7 @@ async function sync() {
return result.json();
}

const model = await modelsClient.models.get<Post>({
const model = modelsClient.models.get<Post>({
$sync: /* ... */,
/* other registrations */
})
Expand Down

0 comments on commit d710aa1

Please sign in to comment.