-- Turn on automatic inflection of type namescommentonschemapublicis'@graphql({"inflect_names": true})';createtableaccount(idserialprimarykey,emailvarchar(255)notnull,created_attimestampnotnull,updated_attimestampnotnull);-- enable a `totalCount` field on the `account` query typecommentontableaccountise'@graphql({"totalCount": {"enabled": true}})';createtableblog(idserialprimarykey,owner_idintegernotnullreferencesaccount(id),namevarchar(255)notnull,descriptionvarchar(255),tagstext[],created_attimestampnotnull,updated_attimestampnotnull);createtypeblog_post_statusasenum('PENDING','RELEASED');createtableblog_post(iduuidnotnulldefaultgen_random_uuid()primarykey,blog_idintegernotnullreferencesblog(id),titlevarchar(255)notnull,bodyvarchar(10000),statusblog_post_statusnotnull,created_attimestampnotnull,updated_attimestampnotnull);
typeAccountimplementsNode{"""Globally Unique Record Identifier"""
nodeId: ID!
id: Int!
email: String!
createdAt: Datetime!
updatedAt: Datetime!blogCollection("""Query the first `n` records in the collection"""
first: Int"""Query the last `n` records in the collection"""
last: Int"""Query values in the collection before the provided cursor"""
before: Cursor"""Query values in the collection after the provided cursor"""
after: Cursor""" Skip n values from the after cursor. Alternative to cursor pagination. Backward pagination not supported. """
offset: Int"""Filters to apply to the results set when querying from the collection"""
filter: BlogFilter"""Sort order to apply to the collection"""
orderBy: [BlogOrderBy!]):BlogConnection}typeAccountConnection{
edges: [AccountEdge!]!
pageInfo: PageInfo!"""The total number of records matching the `filter` criteria"""
totalCount: Int!}typeAccountDeleteResponse{"""Count of the records impacted by the mutation"""
affectedCount: Int!"""Array of records impacted by the mutation"""
records: [Account!]!}typeAccountEdge{
cursor: String!
node: Account!}inputAccountFilter{
id: IntFilter
email: StringFilter
createdAt: DatetimeFilter
updatedAt: DatetimeFilter
nodeId: IDFilter""" Returns true only if all its inner filters are true, otherwise returns false """
and: [AccountFilter!]""" Returns true if at least one of its inner filters is true, otherwise returns false """
or: [AccountFilter!]"""Negates a filter"""
not: AccountFilter}inputAccountInsertInput{
email: String
createdAt: Datetime
updatedAt: Datetime}typeAccountInsertResponse{"""Count of the records impacted by the mutation"""
affectedCount: Int!"""Array of records impacted by the mutation"""
records: [Account!]!}inputAccountOrderBy{
id: OrderByDirection
email: OrderByDirection
createdAt: OrderByDirection
updatedAt: OrderByDirection}inputAccountUpdateInput{
email: String
createdAt: Datetime
updatedAt: Datetime}typeAccountUpdateResponse{"""Count of the records impacted by the mutation"""
affectedCount: Int!"""Array of records impacted by the mutation"""
records: [Account!]!}"""A high precision floating point value represented as a string"""scalarBigFloat"""Boolean expression comparing fields on type "BigFloat""""inputBigFloatFilter{
eq: BigFloat
gt: BigFloat
gte: BigFloat
in: [BigFloat!]
is: FilterIs
lt: BigFloat
lte: BigFloat
neq: BigFloat}"""Boolean expression comparing fields on type "BigFloatList""""inputBigFloatListFilter{
containedBy: [BigFloat!]
contains: [BigFloat!]
eq: [BigFloat!]
overlaps: [BigFloat!]
is: FilterIs}"""An arbitrary size integer represented as a string"""scalarBigInt"""Boolean expression comparing fields on type "BigInt""""inputBigIntFilter{
eq: BigInt
gt: BigInt
gte: BigInt
in: [BigInt!]
is: FilterIs
lt: BigInt
lte: BigInt
neq: BigInt}"""Boolean expression comparing fields on type "BigIntList""""inputBigIntListFilter{
containedBy: [BigFloat!]
contains: [BigFloat!]
eq: [BigFloat!]
overlaps: [BigFloat!]
is: FilterIs}typeBlogimplementsNode{"""Globally Unique Record Identifier"""
nodeId: ID!
id: Int!
ownerId: Int!
name: String!
description: String
tags: [String]
createdAt: Datetime!
updatedAt: Datetime!
owner: Account!blogPostCollection("""Query the first `n` records in the collection"""
first: Int"""Query the last `n` records in the collection"""
last: Int"""Query values in the collection before the provided cursor"""
before: Cursor"""Query values in the collection after the provided cursor"""
after: Cursor""" Skip n values from the after cursor. Alternative to cursor pagination. Backward pagination not supported. """
offset: Int"""Filters to apply to the results set when querying from the collection"""
filter: BlogPostFilter"""Sort order to apply to the collection"""
orderBy: [BlogPostOrderBy!]):BlogPostConnection}typeBlogConnection{
edges: [BlogEdge!]!
pageInfo: PageInfo!}typeBlogDeleteResponse{"""Count of the records impacted by the mutation"""
affectedCount: Int!"""Array of records impacted by the mutation"""
records: [Blog!]!}typeBlogEdge{
cursor: String!
node: Blog!}inputBlogFilter{
id: IntFilter
ownerId: IntFilter
name: StringFilter
description: StringFilter
tags: StringListFilter
createdAt: DatetimeFilter
updatedAt: DatetimeFilter
nodeId: IDFilter""" Returns true only if all its inner filters are true, otherwise returns false """
and: [BlogFilter!]""" Returns true if at least one of its inner filters is true, otherwise returns false """
or: [BlogFilter!]"""Negates a filter"""
not: BlogFilter}inputBlogInsertInput{
ownerId: Int
name: String
description: String
createdAt: Datetime
updatedAt: Datetime}typeBlogInsertResponse{"""Count of the records impacted by the mutation"""
affectedCount: Int!"""Array of records impacted by the mutation"""
records: [Blog!]!}inputBlogOrderBy{
id: OrderByDirection
ownerId: OrderByDirection
name: OrderByDirection
description: OrderByDirection
createdAt: OrderByDirection
updatedAt: OrderByDirection}typeBlogPostimplementsNode{"""Globally Unique Record Identifier"""
nodeId: ID!
id: UUID!
blogId: Int!
title: String!
body: String
status: BlogPostStatus!
createdAt: Datetime!
updatedAt: Datetime!
blog: Blog!}typeBlogPostConnection{
edges: [BlogPostEdge!]!
pageInfo: PageInfo!}typeBlogPostDeleteResponse{"""Count of the records impacted by the mutation"""
affectedCount: Int!"""Array of records impacted by the mutation"""
records: [BlogPost!]!}typeBlogPostEdge{
cursor: String!
node: BlogPost!}inputBlogPostFilter{
id: UUIDFilter
blogId: IntFilter
title: StringFilter
body: StringFilter
status: BlogPostStatusFilter
createdAt: DatetimeFilter
updatedAt: DatetimeFilter
nodeId: IDFilter""" Returns true only if all its inner filters are true, otherwise returns false """
and: [BlogPostFilter!]""" Returns true if at least one of its inner filters is true, otherwise returns false """
or: [BlogPostFilter!]"""Negates a filter"""
not: BlogPostFilter}inputBlogPostInsertInput{
id: UUID
blogId: Int
title: String
body: String
status: BlogPostStatus
createdAt: Datetime
updatedAt: Datetime}typeBlogPostInsertResponse{"""Count of the records impacted by the mutation"""
affectedCount: Int!"""Array of records impacted by the mutation"""
records: [BlogPost!]!}inputBlogPostOrderBy{
id: OrderByDirection
blogId: OrderByDirection
title: OrderByDirection
body: OrderByDirection
status: OrderByDirection
createdAt: OrderByDirection
updatedAt: OrderByDirection}enumBlogPostStatus{PENDINGRELEASED}"""Boolean expression comparing fields on type "BlogPostStatus""""inputBlogPostStatusFilter{
eq: BlogPostStatus
in: [BlogPostStatus!]
is: FilterIs
neq: BlogPostStatus}inputBlogPostUpdateInput{
id: UUID
blogId: Int
title: String
body: String
status: BlogPostStatus
createdAt: Datetime
updatedAt: Datetime}typeBlogPostUpdateResponse{"""Count of the records impacted by the mutation"""
affectedCount: Int!"""Array of records impacted by the mutation"""
records: [BlogPost!]!}inputBlogUpdateInput{
ownerId: Int
name: String
description: String
createdAt: Datetime
updatedAt: Datetime}typeBlogUpdateResponse{"""Count of the records impacted by the mutation"""
affectedCount: Int!"""Array of records impacted by the mutation"""
records: [Blog!]!}"""Boolean expression comparing fields on type "Boolean""""inputBooleanFilter{
eq: Boolean
is: FilterIs}"""Boolean expression comparing fields on type "BooleanList""""inputBooleanListFilter{
containedBy: [BigFloat!]
contains: [BigFloat!]
eq: [BigFloat!]
overlaps: [BigFloat!]
is: FilterIs}"""An opaque string using for tracking a position in results during pagination"""scalarCursor"""A date without time information"""scalarDate"""Boolean expression comparing fields on type "Date""""inputDateFilter{
eq: Date
gt: Date
gte: Date
in: [Date!]
is: FilterIs
lt: Date
lte: Date
neq: Date}"""Boolean expression comparing fields on type "DateList""""inputDateListFilter{
containedBy: [BigFloat!]
contains: [BigFloat!]
eq: [BigFloat!]
overlaps: [BigFloat!]
is: FilterIs}"""A date and time"""scalarDatetime"""Boolean expression comparing fields on type "Datetime""""inputDatetimeFilter{
eq: Datetime
gt: Datetime
gte: Datetime
in: [Datetime!]
is: FilterIs
lt: Datetime
lte: Datetime
neq: Datetime}"""Boolean expression comparing fields on type "DatetimeList""""inputDatetimeListFilter{
containedBy: [BigFloat!]
contains: [BigFloat!]
eq: [BigFloat!]
overlaps: [BigFloat!]
is: FilterIs}enumFilterIs{NULLNOT_NULL}"""Boolean expression comparing fields on type "Float""""inputFloatFilter{
eq: Float
gt: Float
gte: Float
in: [Float!]
is: FilterIs
lt: Float
lte: Float
neq: Float}"""Boolean expression comparing fields on type "FloatList""""inputFloatListFilter{
containedBy: [BigFloat!]
contains: [BigFloat!]
eq: [BigFloat!]
overlaps: [BigFloat!]
is: FilterIs}"""Boolean expression comparing fields on type "ID""""inputIDFilter{
eq: ID}"""Boolean expression comparing fields on type "Int""""inputIntFilter{
eq: Int
gt: Int
gte: Int
in: [Int!]
is: FilterIs
lt: Int
lte: Int
neq: Int}"""Boolean expression comparing fields on type "IntList""""inputIntListFilter{
containedBy: [BigFloat!]
contains: [BigFloat!]
eq: [BigFloat!]
overlaps: [BigFloat!]
is: FilterIs}"""A Javascript Object Notation value serialized as a string"""scalarJSON"""The root type for creating and mutating data"""typeMutation{"""Deletes zero or more records from the `Account` collection"""deleteFromAccountCollection("""Restricts the mutation's impact to records matching the criteria"""
filter: AccountFilter""" The maximum number of records in the collection permitted to be affected """
atMost: Int!=1):AccountDeleteResponse!"""Deletes zero or more records from the `Blog` collection"""deleteFromBlogCollection("""Restricts the mutation's impact to records matching the criteria"""
filter: BlogFilter""" The maximum number of records in the collection permitted to be affected """
atMost: Int!=1):BlogDeleteResponse!"""Deletes zero or more records from the `BlogPost` collection"""deleteFromBlogPostCollection("""Restricts the mutation's impact to records matching the criteria"""
filter: BlogPostFilter""" The maximum number of records in the collection permitted to be affected """
atMost: Int!=1):BlogPostDeleteResponse!"""Adds one or more `Account` records to the collection"""insertIntoAccountCollection(objects: [AccountInsertInput!]!):AccountInsertResponse"""Adds one or more `Blog` records to the collection"""insertIntoBlogCollection(objects: [BlogInsertInput!]!):BlogInsertResponse"""Adds one or more `BlogPost` records to the collection"""insertIntoBlogPostCollection(objects: [BlogPostInsertInput!]!):BlogPostInsertResponse"""Updates zero or more records in the `Account` collection"""updateAccountCollection(""" Fields that are set will be updated for all records matching the `filter` """
set: AccountUpdateInput!"""Restricts the mutation's impact to records matching the criteria"""
filter: AccountFilter""" The maximum number of records in the collection permitted to be affected """
atMost: Int!=1):AccountUpdateResponse!"""Updates zero or more records in the `Blog` collection"""updateBlogCollection(""" Fields that are set will be updated for all records matching the `filter` """
set: BlogUpdateInput!"""Restricts the mutation's impact to records matching the criteria"""
filter: BlogFilter""" The maximum number of records in the collection permitted to be affected """
atMost: Int!=1):BlogUpdateResponse!"""Updates zero or more records in the `BlogPost` collection"""updateBlogPostCollection(""" Fields that are set will be updated for all records matching the `filter` """
set: BlogPostUpdateInput!"""Restricts the mutation's impact to records matching the criteria"""
filter: BlogPostFilter""" The maximum number of records in the collection permitted to be affected """
atMost: Int!=1):BlogPostUpdateResponse!}interfaceNode{"""Retrieves a record by `ID`"""
nodeId: ID!}"""Any type not handled by the type system"""scalarOpaque"""Boolean expression comparing fields on type "Opaque""""inputOpaqueFilter{
eq: Opaque
is: FilterIs}"""Defines a per-field sorting order"""enumOrderByDirection{"""Ascending order, nulls first"""AscNullsFirst"""Ascending order, nulls last"""AscNullsLast"""Descending order, nulls first"""DescNullsFirst"""Descending order, nulls last"""DescNullsLast}typePageInfo{
endCursor: String
hasNextPage: Boolean!
hasPreviousPage: Boolean!
startCursor: String}"""The root type for querying data"""typeQuery{"""A pagable collection of type `Account`"""accountCollection("""Query the first `n` records in the collection"""
first: Int"""Query the last `n` records in the collection"""
last: Int"""Query values in the collection before the provided cursor"""
before: Cursor"""Query values in the collection after the provided cursor"""
after: Cursor""" Skip n values from the after cursor. Alternative to cursor pagination. Backward pagination not supported. """
offset: Int"""Filters to apply to the results set when querying from the collection"""
filter: AccountFilter"""Sort order to apply to the collection"""
orderBy: [AccountOrderBy!]):AccountConnection"""A pagable collection of type `Blog`"""blogCollection("""Query the first `n` records in the collection"""
first: Int"""Query the last `n` records in the collection"""
last: Int"""Query values in the collection before the provided cursor"""
before: Cursor"""Query values in the collection after the provided cursor"""
after: Cursor""" Skip n values from the after cursor. Alternative to cursor pagination. Backward pagination not supported. """
offset: Int"""Filters to apply to the results set when querying from the collection"""
filter: BlogFilter"""Sort order to apply to the collection"""
orderBy: [BlogOrderBy!]):BlogConnection"""A pagable collection of type `BlogPost`"""blogPostCollection("""Query the first `n` records in the collection"""
first: Int"""Query the last `n` records in the collection"""
last: Int"""Query values in the collection before the provided cursor"""
before: Cursor"""Query values in the collection after the provided cursor"""
after: Cursor""" Skip n values from the after cursor. Alternative to cursor pagination. Backward pagination not supported. """
offset: Int"""Filters to apply to the results set when querying from the collection"""
filter: BlogPostFilter"""Sort order to apply to the collection"""
orderBy: [BlogPostOrderBy!]):BlogPostConnection"""Retrieve a record by its `ID`"""node("""The record's `ID`"""
nodeId: ID!):Node}"""Boolean expression comparing fields on type "String""""inputStringFilter{
eq: String
gt: String
gte: String
ilike: String
in: [String!]
iregex: String
is: FilterIs
like: String
lt: String
lte: String
neq: String
regex: String
startsWith: String}"""Boolean expression comparing fields on type "StringList""""inputStringListFilter{
containedBy: [BigFloat!]
contains: [BigFloat!]
eq: [BigFloat!]
overlaps: [BigFloat!]
is: FilterIs}"""A time without date information"""scalarTime"""Boolean expression comparing fields on type "Time""""inputTimeFilter{
eq: Time
gt: Time
gte: Time
in: [Time!]
is: FilterIs
lt: Time
lte: Time
neq: Time}"""Boolean expression comparing fields on type "TimeList""""inputTimeListFilter{
containedBy: [BigFloat!]
contains: [BigFloat!]
eq: [BigFloat!]
overlaps: [BigFloat!]
is: FilterIs}"""A universally unique identifier"""scalarUUID"""Boolean expression comparing fields on type "UUID""""inputUUIDFilter{
eq: UUID
in: [UUID!]
is: FilterIs
neq: UUID}"""Boolean expression comparing fields on type "UUIDList""""inputUUIDListFilter{
containedBy: [BigFloat!]
contains: [BigFloat!]
eq: [BigFloat!]
overlaps: [BigFloat!]
is: FilterIs}