Skip to content

Commit 09e36c3

Browse files
authored
Update README.md
Update the SQL schema to include the inflection comment directive, especially since the screenshot below has inflected field and type names.
1 parent 2b68b46 commit 09e36c3

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)