Skip to content

Commit b0aa275

Browse files
authored
Merge pull request #579 from MrPiao/patch-1
Add inflection comment directive to the SQL schema in the README
2 parents 2b68b46 + 09e36c3 commit b0aa275

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ create table blog_post(
6060
created_at timestamp not null,
6161
updated_at timestamp not null
6262
);
63+
64+
-- This enables default inflection, which automatically renames
65+
-- snake_case to PascalCase for type names, and snake_case to camelCase for field names.
66+
-- See https://supabase.github.io/pg_graphql/configuration/#inflection for more details.
67+
COMMENT ON SCHEMA public IS e'@graphql({"inflect_names": true})';
6368
```
6469
Translates into a GraphQL schema displayed below.
6570

0 commit comments

Comments
 (0)