Skip to content

Commit 121c506

Browse files
authored
fix: default() applies to scalars and enums, not arrays (#7997)
1 parent a22544c commit 121c506

File tree

1 file changed

+1
-1
lines changed
  • src/pages/[platform]/build-a-backend/data/data-modeling/add-fields

1 file changed

+1
-1
lines changed

src/pages/[platform]/build-a-backend/data/data-modeling/add-fields/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ const schema = a.schema({
224224

225225
## Assign default values for fields
226226

227-
You can use the `.default(...)` modifier to specify a default value for optional [scalar type fields and arrays](https://docs.aws.amazon.com/appsync/latest/devguide/scalars.html). The `.default(...)` modifier is not available for custom types, enums, or relationships.
227+
You can use the `.default(...)` modifier to specify a default value for optional [scalar type fields and enums](https://docs.aws.amazon.com/appsync/latest/devguide/scalars.html). The `.default(...)` modifier is not available for custom types, arrays, or relationships.
228228

229229
```ts
230230
const schema = a.schema({

0 commit comments

Comments
 (0)