Skip to content

docs: document columns left out of insert and update inputs - #666

Open
Indian-boult wants to merge 1 commit into
supabase:masterfrom
Indian-boult:docs/serial-generated-columns-in-mutations
Open

Indian-boult wants to merge 1 commit into
supabase:masterfrom
Indian-boult:docs/serial-generated-columns-in-mutations

Conversation

@Indian-boult

Copy link
Copy Markdown

Fixes #501

The Insert and Update sections of docs/api.md now say that serial, identity and generated columns are left out of <Table>InsertInput and <Table>UpdateInput. They also say that a column with a nextval default on a sequence created by hand stays in, unless the column owns that sequence.

I checked this on PostgreSQL 17 against pg_graphql built from current master. I made a table with one column of each kind and looked at the input types with __type introspection, then ran insert and update mutations through graphql.resolve. mkdocs build --strict passes.

serial, identity and generated columns are not part of the
<Table>InsertInput and <Table>UpdateInput types, so their values always
come from PostgreSQL. Say so in the Insert and Update sections of the
API docs, and say when a column with a nextval default stays in.

Fixes supabase#501

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document that serial and generated columns are not in insert and update mutations

1 participant