@pg
PostGraphile smart comments for PostgreSQL
PostgresExample
Add PostGraphile smart comments
Multiple @pg.* tags on one object are combined into a single smart comment.
-- @pg.simpleCollections
-- @pg.name('Customer')
CREATE TABLE users (
id SERIAL PRIMARY KEY,
email TEXT NOT NULL
);COMMENT ON TABLE "users" IS E'@simpleCollections only\n@name Customer';Tags
@pg.omit
Omit this object from the PostGraphile GraphQL schema
Targets: table, column, view, function
Arguments: No arguments.
@pg.omit.operations
Omit specific operations from the PostGraphile GraphQL schema
Targets: table, column, view, function
Arguments:
| Name | Type | Required | Values |
|---|---|---|---|
| ops | array | Yes | create, read, update, delete, all, many |
@pg.name
Rename this object in the PostGraphile GraphQL schema
Targets: table, column, view, function, type
Arguments:Positional: string
@pg.deprecated
Mark this object as deprecated in the PostGraphile GraphQL schema
Targets: table, column, view, function, type
Arguments:Positional: string
@pg.simpleCollections
Enable simple collections on this table or view in PostGraphile
Targets: table, view
Arguments: No arguments.
@pg.behavior
Set a custom behavior string (PostGraphile V5)
Targets: table, column, view, function, type
Arguments:Positional: string
