Skip to content

Commit c2ec5c0

Browse files
authored
fix empty schema on getting started manual installation page (#7995)
* fix empty schema on getting started manual installation page * removed accidental yarn edit commit to package.json * removed comment noting schemas cannot be empty
1 parent 7ac05b9 commit c2ec5c0

File tree

1 file changed

+7
-1
lines changed
  • src/pages/[platform]/start/manual-installation

1 file changed

+7
-1
lines changed

src/pages/[platform]/start/manual-installation/index.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,13 @@ Or define your data resource:
118118
```ts title="amplify/data/resource.ts"
119119
import { a, defineData, type ClientSchema } from '@aws-amplify/backend';
120120

121-
const schema = a.schema({});
121+
const schema = a.schema({
122+
Todo: a.model({
123+
content: a.string(),
124+
isDone: a.boolean()
125+
})
126+
.authorization(allow => [allow.publicApiKey()])
127+
});
122128

123129
export type Schema = ClientSchema<typeof schema>;
124130
export const data = defineData({

0 commit comments

Comments
 (0)