Skip to content

Commit 1bb7fa2

Browse files
authored
add @hasDefault to smart-tags.md (#346)
1 parent 58e9402 commit 1bb7fa2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/pages/postgraphile/smart-tags.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,16 @@ comment on column my_schema.my_table.my_column is
142142
E'@deprecated Use myOtherColumn instead.';
143143
```
144144

145+
### @hasDefault
146+
147+
You can indicate that a column has a default - be that implemented via a trigger,
148+
or maybe as an instead of insert rule - so the field will be nullable in create*
149+
mutations.
150+
151+
```sql
152+
comment on column my_schema.my_table.my_column is E'@hasDefault';
153+
```
154+
145155
#### @name
146156

147157
You can add a smart tag to an entity to rename that entity. For tables, columns,

0 commit comments

Comments
 (0)