From a6e813873b24ffaadbfd668c1c1ca81060fbfe87 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Sat, 29 Mar 2025 20:17:18 -0500 Subject: [PATCH 01/29] refactor(env,auth): update JWKS endpoints --- .env.development | 2 +- .env.production | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 8e9da3e..2bb6cda 100644 --- a/.env.development +++ b/.env.development @@ -1 +1 @@ -AUTH_JWKS_URL="https://hidra.omni.dev/realms/test/protocol/openid-connect/certs" +AUTH_JWKS_URL="https://localhost:8000/api/auth/jwks" diff --git a/.env.production b/.env.production index 885f864..2b3f26b 100644 --- a/.env.production +++ b/.env.production @@ -1 +1 @@ -AUTH_JWKS_URL="https://hidra.omni.dev/realms/omni/protocol/openid-connect/certs" +AUTH_JWKS_URL="https://identity.omni.dev/api/auth/jwks" From 16f15b03f4038d3537627f8a5e62926ca4060fee Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Sat, 29 Mar 2025 20:49:00 -0500 Subject: [PATCH 02/29] chore: format based on default Biome styles --- biome.json => biome.jsonc | 8 -------- src/generated/graphql/schema.executable.ts | 20 +++++++++---------- src/lib/drizzle/schema/comment.table.ts | 2 +- src/lib/drizzle/schema/downvote.table.ts | 2 +- src/lib/drizzle/schema/member.table.ts | 2 +- src/lib/drizzle/schema/organization.table.ts | 2 +- src/lib/drizzle/schema/post.table.ts | 2 +- src/lib/drizzle/schema/postStatus.table.ts | 2 +- src/lib/drizzle/schema/project.table.ts | 2 +- src/lib/drizzle/schema/upvote.table.ts | 2 +- src/lib/drizzle/schema/user.table.ts | 2 +- src/lib/plugins/envelop/useAuth.ts | 18 +++++++++++++++-- .../plugins/postgraphile/CommentRBACPlugin.ts | 8 ++++---- .../postgraphile/DownvoteRBACPlugin.ts | 4 ++-- .../plugins/postgraphile/MemberRBACPlugin.ts | 10 +++++----- .../postgraphile/OrganizationRBACPlugin.ts | 8 ++++---- .../plugins/postgraphile/PostRBACPlugin.ts | 8 ++++---- .../postgraphile/PostStatusRBACPlugin.ts | 8 ++++---- .../plugins/postgraphile/ProjectRBACPlugin.ts | 8 ++++---- .../plugins/postgraphile/UpvoteRBACPlugin.ts | 4 ++-- .../plugins/postgraphile/UserRBACPlugin.ts | 2 +- src/server.ts | 4 ++-- 22 files changed, 67 insertions(+), 61 deletions(-) rename biome.json => biome.jsonc (79%) diff --git a/biome.json b/biome.jsonc similarity index 79% rename from biome.json rename to biome.jsonc index 4127caf..9712d73 100644 --- a/biome.json +++ b/biome.jsonc @@ -29,13 +29,5 @@ "noNonNullAssertion": "off" } } - }, - "javascript": { - "formatter": { - "quoteStyle": "double", - "arrowParentheses": "always", - "semicolons": "always", - "trailingCommas": "es5" - } } } diff --git a/src/generated/graphql/schema.executable.ts b/src/generated/graphql/schema.executable.ts index 23aecea..2aabb73 100644 --- a/src/generated/graphql/schema.executable.ts +++ b/src/generated/graphql/schema.executable.ts @@ -148,7 +148,7 @@ const spec_downvote = { }), description: undefined, extensions: { - oid: "177582", + oid: "42158", isTableLike: true, pg: { serviceName: "main", @@ -228,7 +228,7 @@ const spec_upvote = { }), description: undefined, extensions: { - oid: "177495", + oid: "42071", isTableLike: true, pg: { serviceName: "main", @@ -308,7 +308,7 @@ const spec_organization = { }), description: undefined, extensions: { - oid: "177457", + oid: "42033", isTableLike: true, pg: { serviceName: "main", @@ -400,7 +400,7 @@ const spec_comment = { }), description: undefined, extensions: { - oid: "177562", + oid: "42138", isTableLike: true, pg: { serviceName: "main", @@ -504,7 +504,7 @@ const spec_user = { }), description: undefined, extensions: { - oid: "177505", + oid: "42081", isTableLike: true, pg: { serviceName: "main", @@ -523,7 +523,7 @@ const roleCodec = enumCodec({ values: ["owner", "admin", "member"], description: undefined, extensions: { - oid: "177601", + oid: "42177", pg: { serviceName: "main", schemaName: "public", @@ -599,7 +599,7 @@ const spec_member = { }), description: undefined, extensions: { - oid: "177517", + oid: "42093", isTableLike: true, pg: { serviceName: "main", @@ -727,7 +727,7 @@ const spec_post = { }), description: undefined, extensions: { - oid: "177471", + oid: "42047", isTableLike: true, pg: { serviceName: "main", @@ -843,7 +843,7 @@ const spec_postStatus = { }), description: undefined, extensions: { - oid: "177655", + oid: "42231", isTableLike: true, pg: { serviceName: "main", @@ -959,7 +959,7 @@ const spec_project = { }), description: undefined, extensions: { - oid: "177481", + oid: "42057", isTableLike: true, pg: { serviceName: "main", diff --git a/src/lib/drizzle/schema/comment.table.ts b/src/lib/drizzle/schema/comment.table.ts index f2ded00..5b9c76f 100644 --- a/src/lib/drizzle/schema/comment.table.ts +++ b/src/lib/drizzle/schema/comment.table.ts @@ -31,7 +31,7 @@ export const comments = pgTable( uniqueIndex().on(table.id), index().on(table.postId), index().on(table.userId), - ] + ], ); /** diff --git a/src/lib/drizzle/schema/downvote.table.ts b/src/lib/drizzle/schema/downvote.table.ts index 54b080e..ec51892 100644 --- a/src/lib/drizzle/schema/downvote.table.ts +++ b/src/lib/drizzle/schema/downvote.table.ts @@ -31,7 +31,7 @@ export const downvotes = pgTable( uniqueIndex().on(table.id), index().on(table.postId), index().on(table.userId), - ] + ], ); /** diff --git a/src/lib/drizzle/schema/member.table.ts b/src/lib/drizzle/schema/member.table.ts index 7d8ddb9..13686a4 100644 --- a/src/lib/drizzle/schema/member.table.ts +++ b/src/lib/drizzle/schema/member.table.ts @@ -43,7 +43,7 @@ export const members = pgTable( uniqueIndex().on(table.id), index().on(table.userId), index().on(table.organizationId), - ] + ], ); /** diff --git a/src/lib/drizzle/schema/organization.table.ts b/src/lib/drizzle/schema/organization.table.ts index cc3bce3..0ed6a77 100644 --- a/src/lib/drizzle/schema/organization.table.ts +++ b/src/lib/drizzle/schema/organization.table.ts @@ -16,7 +16,7 @@ export const organizations = pgTable( createdAt: defaultDate(), updatedAt: defaultDate(), }, - (table) => [uniqueIndex().on(table.id), uniqueIndex().on(table.slug)] + (table) => [uniqueIndex().on(table.id), uniqueIndex().on(table.slug)], ); /** diff --git a/src/lib/drizzle/schema/post.table.ts b/src/lib/drizzle/schema/post.table.ts index 8e0efd5..447b7ac 100644 --- a/src/lib/drizzle/schema/post.table.ts +++ b/src/lib/drizzle/schema/post.table.ts @@ -38,7 +38,7 @@ export const posts = pgTable( index().on(table.projectId), index().on(table.userId), index().on(table.statusId), - ] + ], ); /** diff --git a/src/lib/drizzle/schema/postStatus.table.ts b/src/lib/drizzle/schema/postStatus.table.ts index 9f1ae26..acb797e 100644 --- a/src/lib/drizzle/schema/postStatus.table.ts +++ b/src/lib/drizzle/schema/postStatus.table.ts @@ -37,7 +37,7 @@ export const postStatuses = pgTable( uniqueIndex("post_status_unique_id_index").on(table.id), uniqueIndex().on(table.status, table.projectId), index().on(table.projectId), - ] + ], ); /** diff --git a/src/lib/drizzle/schema/project.table.ts b/src/lib/drizzle/schema/project.table.ts index fa0a651..b10e341 100644 --- a/src/lib/drizzle/schema/project.table.ts +++ b/src/lib/drizzle/schema/project.table.ts @@ -35,7 +35,7 @@ export const projects = pgTable( unique().on(table.slug, table.organizationId), uniqueIndex().on(table.id), index().on(table.organizationId), - ] + ], ); /** diff --git a/src/lib/drizzle/schema/upvote.table.ts b/src/lib/drizzle/schema/upvote.table.ts index 053099f..dcbca93 100644 --- a/src/lib/drizzle/schema/upvote.table.ts +++ b/src/lib/drizzle/schema/upvote.table.ts @@ -31,7 +31,7 @@ export const upvotes = pgTable( uniqueIndex().on(table.id), index().on(table.postId), index().on(table.userId), - ] + ], ); /** diff --git a/src/lib/drizzle/schema/user.table.ts b/src/lib/drizzle/schema/user.table.ts index f3a8727..4fef3b7 100644 --- a/src/lib/drizzle/schema/user.table.ts +++ b/src/lib/drizzle/schema/user.table.ts @@ -19,7 +19,7 @@ export const users = pgTable( createdAt: defaultDate(), updatedAt: defaultDate(), }, - (table) => [uniqueIndex().on(table.id), uniqueIndex().on(table.hidraId)] + (table) => [uniqueIndex().on(table.id), uniqueIndex().on(table.hidraId)], ); /** diff --git a/src/lib/plugins/envelop/useAuth.ts b/src/lib/plugins/envelop/useAuth.ts index e0b0be4..e8ed5d4 100644 --- a/src/lib/plugins/envelop/useAuth.ts +++ b/src/lib/plugins/envelop/useAuth.ts @@ -8,23 +8,36 @@ import type { ResolveUserFn } from "@envelop/generic-auth"; import type { InsertUser, SelectUser } from "lib/drizzle/schema"; import type { GraphQLContext } from "lib/graphql"; +const SECRET = "yDspZ0tLGQZ1hpjJbCFKVmhrVq1DZUKO"; +const ALGORITHM = "HS256"; + /** * Validate user session and resolve user if successful. * @see https://the-guild.dev/graphql/envelop/plugins/use-generic-auth#getting-started */ const resolveUser: ResolveUserFn = async ( - context + context, ) => { try { const sessionToken = context.request.headers .get("authorization") ?.split("Bearer ")[1]; + console.log("SessionToken:", sessionToken); + if (!sessionToken) throw new Error("Invalid or missing session token"); const jwks = jose.createRemoteJWKSet(new URL(AUTH_JWKS_URL!)); - const { payload } = await jose.jwtVerify(sessionToken, jwks); + // const { payload } = await jose.jwtVerify(sessionToken, jwks); + // TODO replace below with above once (LINK) + const { payload } = await jose.jwtVerify( + sessionToken, + new TextEncoder().encode(SECRET), + { algorithms: [ALGORITHM] }, + ); + + console.log("Payload:", payload); if (!payload) throw new Error("Invalid or missing session token"); @@ -57,6 +70,7 @@ const resolveUser: ResolveUserFn = async ( } }; +// TODO rename to useAuth.plugin.ts const useAuth = () => useGenericAuth({ resolveUserFn: resolveUser, diff --git a/src/lib/plugins/postgraphile/CommentRBACPlugin.ts b/src/lib/plugins/postgraphile/CommentRBACPlugin.ts index 4a7a76b..2f93299 100644 --- a/src/lib/plugins/postgraphile/CommentRBACPlugin.ts +++ b/src/lib/plugins/postgraphile/CommentRBACPlugin.ts @@ -43,8 +43,8 @@ const validatePermissions = (propName: string) => .where( and( eq(members.userId, currentUser.id), - eq(members.organizationId, comment.organizationId) - ) + eq(members.organizationId, comment.organizationId), + ), ); // Allow admins and owners to edit and delete comments @@ -52,12 +52,12 @@ const validatePermissions = (propName: string) => throw new Error("Insufficient permissions"); } } - } + }, ); return plan(); }, - [and, eq, dbSchema, context, sideEffect, propName] + [and, eq, dbSchema, context, sideEffect, propName], ); /** diff --git a/src/lib/plugins/postgraphile/DownvoteRBACPlugin.ts b/src/lib/plugins/postgraphile/DownvoteRBACPlugin.ts index de3aab2..a2ccaf9 100644 --- a/src/lib/plugins/postgraphile/DownvoteRBACPlugin.ts +++ b/src/lib/plugins/postgraphile/DownvoteRBACPlugin.ts @@ -35,12 +35,12 @@ const validatePermissions = (propName: string) => if (currentUser.id !== downvote.userId) { throw new Error("Insufficient permissions"); } - } + }, ); return plan(); }, - [and, eq, dbSchema, context, sideEffect, propName] + [and, eq, dbSchema, context, sideEffect, propName], ); /** diff --git a/src/lib/plugins/postgraphile/MemberRBACPlugin.ts b/src/lib/plugins/postgraphile/MemberRBACPlugin.ts index 4ea52b2..9096447 100644 --- a/src/lib/plugins/postgraphile/MemberRBACPlugin.ts +++ b/src/lib/plugins/postgraphile/MemberRBACPlugin.ts @@ -41,7 +41,7 @@ const validatePermissions = (propName: string, scope: MutationScope) => if (organizationUsers.length) { const userRole = organizationUsers.find( - (user) => user.userId === currentUser.id + (user) => user.userId === currentUser.id, )?.role; // Allow users to join an organization as a member @@ -69,8 +69,8 @@ const validatePermissions = (propName: string, scope: MutationScope) => .where( and( eq(members.userId, currentUser.id), - eq(members.organizationId, member.organizationId) - ) + eq(members.organizationId, member.organizationId), + ), ); // Only allow owners to update roles and/or kick other members from the organization @@ -84,12 +84,12 @@ const validatePermissions = (propName: string, scope: MutationScope) => } } } - } + }, ); return plan(); }, - [and, eq, dbSchema, context, sideEffect, propName, scope] + [and, eq, dbSchema, context, sideEffect, propName, scope], ); /** diff --git a/src/lib/plugins/postgraphile/OrganizationRBACPlugin.ts b/src/lib/plugins/postgraphile/OrganizationRBACPlugin.ts index e2fefa1..4bea288 100644 --- a/src/lib/plugins/postgraphile/OrganizationRBACPlugin.ts +++ b/src/lib/plugins/postgraphile/OrganizationRBACPlugin.ts @@ -34,8 +34,8 @@ const validatePermissions = (propName: string, scope: MutationScope) => .where( and( eq(members.userId, currentUser.id), - eq(members.organizationId, organizationId as string) - ) + eq(members.organizationId, organizationId as string), + ), ); // Only allow owners to delete organizations @@ -50,12 +50,12 @@ const validatePermissions = (propName: string, scope: MutationScope) => ) { throw new Error("Insufficient permissions"); } - } + }, ); return plan(); }, - [and, eq, dbSchema, context, sideEffect, propName, scope] + [and, eq, dbSchema, context, sideEffect, propName, scope], ); /** diff --git a/src/lib/plugins/postgraphile/PostRBACPlugin.ts b/src/lib/plugins/postgraphile/PostRBACPlugin.ts index a877283..513b89b 100644 --- a/src/lib/plugins/postgraphile/PostRBACPlugin.ts +++ b/src/lib/plugins/postgraphile/PostRBACPlugin.ts @@ -44,8 +44,8 @@ const validatePermissions = (propName: string) => .where( and( eq(members.userId, currentUser.id), - eq(members.organizationId, post.organizationId) - ) + eq(members.organizationId, post.organizationId), + ), ); // Allow admins and owners to update and delete posts @@ -53,12 +53,12 @@ const validatePermissions = (propName: string) => throw new Error("Insufficient permissions"); } } - } + }, ); return plan(); }, - [and, eq, dbSchema, context, sideEffect, propName] + [and, eq, dbSchema, context, sideEffect, propName], ); /** diff --git a/src/lib/plugins/postgraphile/PostStatusRBACPlugin.ts b/src/lib/plugins/postgraphile/PostStatusRBACPlugin.ts index 38263ad..5300a7d 100644 --- a/src/lib/plugins/postgraphile/PostStatusRBACPlugin.ts +++ b/src/lib/plugins/postgraphile/PostStatusRBACPlugin.ts @@ -55,20 +55,20 @@ const validatePermissions = (propName: string, scope: MutationScope) => .where( and( eq(members.userId, currentUser.id), - eq(members.organizationId, project.organizationId) - ) + eq(members.organizationId, project.organizationId), + ), ); // Allow admins and owners to create, update and delete post statuses if (!userRole || userRole.role === "member") { throw new Error("Insufficient permissions"); } - } + }, ); return plan(); }, - [and, eq, dbSchema, context, sideEffect, propName, scope] + [and, eq, dbSchema, context, sideEffect, propName, scope], ); /** diff --git a/src/lib/plugins/postgraphile/ProjectRBACPlugin.ts b/src/lib/plugins/postgraphile/ProjectRBACPlugin.ts index f7bbf70..4cbbf88 100644 --- a/src/lib/plugins/postgraphile/ProjectRBACPlugin.ts +++ b/src/lib/plugins/postgraphile/ProjectRBACPlugin.ts @@ -48,20 +48,20 @@ const validatePermissions = (propName: string, scope: MutationScope) => .where( and( eq(members.userId, currentUser.id), - eq(members.organizationId, organizationId) - ) + eq(members.organizationId, organizationId), + ), ); // Only allow owners and admins to create, update, and delete projects if (!userRole || userRole.role === "member") { throw new Error("Insufficient permissions"); } - } + }, ); return plan(); }, - [and, eq, dbSchema, context, sideEffect, propName, scope] + [and, eq, dbSchema, context, sideEffect, propName, scope], ); /** diff --git a/src/lib/plugins/postgraphile/UpvoteRBACPlugin.ts b/src/lib/plugins/postgraphile/UpvoteRBACPlugin.ts index e378908..7997ea8 100644 --- a/src/lib/plugins/postgraphile/UpvoteRBACPlugin.ts +++ b/src/lib/plugins/postgraphile/UpvoteRBACPlugin.ts @@ -35,12 +35,12 @@ const validatePermissions = (propName: string) => if (currentUser.id !== upvote.userId) { throw new Error("Insufficient permissions"); } - } + }, ); return plan(); }, - [and, eq, dbSchema, context, sideEffect, propName] + [and, eq, dbSchema, context, sideEffect, propName], ); /** diff --git a/src/lib/plugins/postgraphile/UserRBACPlugin.ts b/src/lib/plugins/postgraphile/UserRBACPlugin.ts index ec8be29..0defd77 100644 --- a/src/lib/plugins/postgraphile/UserRBACPlugin.ts +++ b/src/lib/plugins/postgraphile/UserRBACPlugin.ts @@ -27,7 +27,7 @@ const validatePermissions = (propName: string) => return plan(); }, - [context, sideEffect, propName] + [context, sideEffect, propName], ); /** diff --git a/src/server.ts b/src/server.ts index cd59d44..42a7f9d 100644 --- a/src/server.ts +++ b/src/server.ts @@ -68,7 +68,7 @@ app.use( origin: isProdEnv ? appConfig.url : "https://localhost:3000", credentials: true, allowMethods: ["GET", "POST"], - }) + }), ); // mount GraphQL API @@ -77,7 +77,7 @@ app.use("/graphql", async (c) => yoga.handle(c.req.raw, {})); // GraphQL Yoga suppresses logging the startup message in production environments by default if (isProdEnv) console.log( - `🚀 ${appConfig.name} GraphQL API running at http://${HOST}:${PORT}` + `🚀 ${appConfig.name} GraphQL API running at http://${HOST}:${PORT}`, ); export default { From f080ca7fe5d8858d31a35ddbab177a3afe04cf80 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Sat, 29 Mar 2025 20:50:50 -0500 Subject: [PATCH 03/29] feature: add Tiltfile --- Tiltfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Tiltfile diff --git a/Tiltfile b/Tiltfile new file mode 100644 index 0000000..f1b2174 --- /dev/null +++ b/Tiltfile @@ -0,0 +1,13 @@ +# load environment variables +load("ext://dotenv", "dotenv") + +dotenv(fn=".env.local") + +project_name = "backfeed-api" + +local_resource( + "install-deps-%s" % project_name, + cmd="bun i", + deps=["package.json"], + labels=[project_name], +) From 3e6abcd8822f14e4060b07bfdcee6cdb2291a582 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Sat, 29 Mar 2025 20:57:07 -0500 Subject: [PATCH 04/29] refactor(plugins): set `plugin.ts` extension --- src/lib/plugins/envelop/index.ts | 2 +- src/lib/plugins/envelop/{useAuth.ts => useAuth.plugin.ts} | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) rename src/lib/plugins/envelop/{useAuth.ts => useAuth.plugin.ts} (98%) diff --git a/src/lib/plugins/envelop/index.ts b/src/lib/plugins/envelop/index.ts index 84d3011..f1a46bb 100644 --- a/src/lib/plugins/envelop/index.ts +++ b/src/lib/plugins/envelop/index.ts @@ -1 +1 @@ -export { default as useAuth } from "./useAuth"; +export { default as useAuth } from "./useAuth.plugin"; diff --git a/src/lib/plugins/envelop/useAuth.ts b/src/lib/plugins/envelop/useAuth.plugin.ts similarity index 98% rename from src/lib/plugins/envelop/useAuth.ts rename to src/lib/plugins/envelop/useAuth.plugin.ts index e8ed5d4..98c1767 100644 --- a/src/lib/plugins/envelop/useAuth.ts +++ b/src/lib/plugins/envelop/useAuth.plugin.ts @@ -70,7 +70,6 @@ const resolveUser: ResolveUserFn = async ( } }; -// TODO rename to useAuth.plugin.ts const useAuth = () => useGenericAuth({ resolveUserFn: resolveUser, From d07ca2ab06a9bad336472f19a54068b7816c0e55 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Sat, 29 Mar 2025 20:58:52 -0500 Subject: [PATCH 05/29] refactor(plugins): set `plugin.ts` extensions --- .../postgraphile/{CommentRBACPlugin.ts => CommentRBAC.plugin.ts} | 0 .../{DownvoteRBACPlugin.ts => DownvoteRBAC.plugin.ts} | 0 .../postgraphile/{MemberRBACPlugin.ts => MemberRBAC.plugin.ts} | 0 .../{OrganizationRBACPlugin.ts => OrganizationRBAC.plugin.ts} | 0 .../postgraphile/{PostRBACPlugin.ts => PostRBAC.plugin.ts} | 0 .../{PostStatusRBACPlugin.ts => PostStatusRBAC.plugin.ts} | 0 ...eyMutationsOnlyPlugin.ts => PrimaryKeyMutationsOnly.plugin.ts} | 0 .../postgraphile/{ProjectRBACPlugin.ts => ProjectRBAC.plugin.ts} | 0 .../postgraphile/{UpvoteRBACPlugin.ts => UpvoteRBAC.plugin.ts} | 0 .../postgraphile/{UserRBACPlugin.ts => UserRBAC.plugin.ts} | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename src/lib/plugins/postgraphile/{CommentRBACPlugin.ts => CommentRBAC.plugin.ts} (100%) rename src/lib/plugins/postgraphile/{DownvoteRBACPlugin.ts => DownvoteRBAC.plugin.ts} (100%) rename src/lib/plugins/postgraphile/{MemberRBACPlugin.ts => MemberRBAC.plugin.ts} (100%) rename src/lib/plugins/postgraphile/{OrganizationRBACPlugin.ts => OrganizationRBAC.plugin.ts} (100%) rename src/lib/plugins/postgraphile/{PostRBACPlugin.ts => PostRBAC.plugin.ts} (100%) rename src/lib/plugins/postgraphile/{PostStatusRBACPlugin.ts => PostStatusRBAC.plugin.ts} (100%) rename src/lib/plugins/postgraphile/{PrimaryKeyMutationsOnlyPlugin.ts => PrimaryKeyMutationsOnly.plugin.ts} (100%) rename src/lib/plugins/postgraphile/{ProjectRBACPlugin.ts => ProjectRBAC.plugin.ts} (100%) rename src/lib/plugins/postgraphile/{UpvoteRBACPlugin.ts => UpvoteRBAC.plugin.ts} (100%) rename src/lib/plugins/postgraphile/{UserRBACPlugin.ts => UserRBAC.plugin.ts} (100%) diff --git a/src/lib/plugins/postgraphile/CommentRBACPlugin.ts b/src/lib/plugins/postgraphile/CommentRBAC.plugin.ts similarity index 100% rename from src/lib/plugins/postgraphile/CommentRBACPlugin.ts rename to src/lib/plugins/postgraphile/CommentRBAC.plugin.ts diff --git a/src/lib/plugins/postgraphile/DownvoteRBACPlugin.ts b/src/lib/plugins/postgraphile/DownvoteRBAC.plugin.ts similarity index 100% rename from src/lib/plugins/postgraphile/DownvoteRBACPlugin.ts rename to src/lib/plugins/postgraphile/DownvoteRBAC.plugin.ts diff --git a/src/lib/plugins/postgraphile/MemberRBACPlugin.ts b/src/lib/plugins/postgraphile/MemberRBAC.plugin.ts similarity index 100% rename from src/lib/plugins/postgraphile/MemberRBACPlugin.ts rename to src/lib/plugins/postgraphile/MemberRBAC.plugin.ts diff --git a/src/lib/plugins/postgraphile/OrganizationRBACPlugin.ts b/src/lib/plugins/postgraphile/OrganizationRBAC.plugin.ts similarity index 100% rename from src/lib/plugins/postgraphile/OrganizationRBACPlugin.ts rename to src/lib/plugins/postgraphile/OrganizationRBAC.plugin.ts diff --git a/src/lib/plugins/postgraphile/PostRBACPlugin.ts b/src/lib/plugins/postgraphile/PostRBAC.plugin.ts similarity index 100% rename from src/lib/plugins/postgraphile/PostRBACPlugin.ts rename to src/lib/plugins/postgraphile/PostRBAC.plugin.ts diff --git a/src/lib/plugins/postgraphile/PostStatusRBACPlugin.ts b/src/lib/plugins/postgraphile/PostStatusRBAC.plugin.ts similarity index 100% rename from src/lib/plugins/postgraphile/PostStatusRBACPlugin.ts rename to src/lib/plugins/postgraphile/PostStatusRBAC.plugin.ts diff --git a/src/lib/plugins/postgraphile/PrimaryKeyMutationsOnlyPlugin.ts b/src/lib/plugins/postgraphile/PrimaryKeyMutationsOnly.plugin.ts similarity index 100% rename from src/lib/plugins/postgraphile/PrimaryKeyMutationsOnlyPlugin.ts rename to src/lib/plugins/postgraphile/PrimaryKeyMutationsOnly.plugin.ts diff --git a/src/lib/plugins/postgraphile/ProjectRBACPlugin.ts b/src/lib/plugins/postgraphile/ProjectRBAC.plugin.ts similarity index 100% rename from src/lib/plugins/postgraphile/ProjectRBACPlugin.ts rename to src/lib/plugins/postgraphile/ProjectRBAC.plugin.ts diff --git a/src/lib/plugins/postgraphile/UpvoteRBACPlugin.ts b/src/lib/plugins/postgraphile/UpvoteRBAC.plugin.ts similarity index 100% rename from src/lib/plugins/postgraphile/UpvoteRBACPlugin.ts rename to src/lib/plugins/postgraphile/UpvoteRBAC.plugin.ts diff --git a/src/lib/plugins/postgraphile/UserRBACPlugin.ts b/src/lib/plugins/postgraphile/UserRBAC.plugin.ts similarity index 100% rename from src/lib/plugins/postgraphile/UserRBACPlugin.ts rename to src/lib/plugins/postgraphile/UserRBAC.plugin.ts From 640a11230bd3aac06084464a32b85d8fa8f2dc0b Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Sat, 29 Mar 2025 21:01:21 -0500 Subject: [PATCH 06/29] fix(plugins): fix barrel --- src/lib/plugins/postgraphile/index.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/plugins/postgraphile/index.ts b/src/lib/plugins/postgraphile/index.ts index b323175..66f186a 100644 --- a/src/lib/plugins/postgraphile/index.ts +++ b/src/lib/plugins/postgraphile/index.ts @@ -1,10 +1,10 @@ -export { default as CommentRBACPlugin } from "./CommentRBACPlugin"; -export { default as DownvoteRBACPlugin } from "./DownvoteRBACPlugin"; -export { default as MemberRBACPlugin } from "./MemberRBACPlugin"; -export { default as OrganizationRBACPlugin } from "./OrganizationRBACPlugin"; -export { default as PostRBACPlugin } from "./PostRBACPlugin"; -export { default as PostStatusRBACPlugin } from "./PostStatusRBACPlugin"; -export { default as PrimaryKeyMutationsOnlyPlugin } from "./PrimaryKeyMutationsOnlyPlugin"; -export { default as ProjectRBACPlugin } from "./ProjectRBACPlugin"; -export { default as UpvoteRBACPlugin } from "./UpvoteRBACPlugin"; -export { default as UserRBACPlugin } from "./UserRBACPlugin"; +export { default as CommentRBACPlugin } from "./CommentRBAC.plugin"; +export { default as DownvoteRBACPlugin } from "./DownvoteRBAC.plugin"; +export { default as MemberRBACPlugin } from "./MemberRBAC.plugin"; +export { default as OrganizationRBACPlugin } from "./OrganizationRBAC.plugin"; +export { default as PostRBACPlugin } from "./PostRBAC.plugin"; +export { default as PostStatusRBACPlugin } from "./PostStatusRBAC.plugin"; +export { default as PrimaryKeyMutationsOnlyPlugin } from "./PrimaryKeyMutationsOnly.plugin"; +export { default as ProjectRBACPlugin } from "./ProjectRBAC.plugin"; +export { default as UpvoteRBACPlugin } from "./UpvoteRBAC.plugin"; +export { default as UserRBACPlugin } from "./UserRBAC.plugin"; From a49ef2282783e2400cac21c7f8ff2e0af9a1d51e Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Sat, 29 Mar 2025 21:05:07 -0500 Subject: [PATCH 07/29] chore: add TODO --- src/lib/plugins/envelop/useAuth.plugin.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/plugins/envelop/useAuth.plugin.ts b/src/lib/plugins/envelop/useAuth.plugin.ts index 98c1767..b92acec 100644 --- a/src/lib/plugins/envelop/useAuth.plugin.ts +++ b/src/lib/plugins/envelop/useAuth.plugin.ts @@ -8,6 +8,7 @@ import type { ResolveUserFn } from "@envelop/generic-auth"; import type { InsertUser, SelectUser } from "lib/drizzle/schema"; import type { GraphQLContext } from "lib/graphql"; +// TODO remove, just for testing const SECRET = "yDspZ0tLGQZ1hpjJbCFKVmhrVq1DZUKO"; const ALGORITHM = "HS256"; From 2be5281c0ee13b7d69b4235a61f7b4de2ab51949 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Sat, 29 Mar 2025 21:08:53 -0500 Subject: [PATCH 08/29] chore: remove unused code --- src/lib/plugins/envelop/useAuth.plugin.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/lib/plugins/envelop/useAuth.plugin.ts b/src/lib/plugins/envelop/useAuth.plugin.ts index b92acec..c24773c 100644 --- a/src/lib/plugins/envelop/useAuth.plugin.ts +++ b/src/lib/plugins/envelop/useAuth.plugin.ts @@ -8,10 +8,6 @@ import type { ResolveUserFn } from "@envelop/generic-auth"; import type { InsertUser, SelectUser } from "lib/drizzle/schema"; import type { GraphQLContext } from "lib/graphql"; -// TODO remove, just for testing -const SECRET = "yDspZ0tLGQZ1hpjJbCFKVmhrVq1DZUKO"; -const ALGORITHM = "HS256"; - /** * Validate user session and resolve user if successful. * @see https://the-guild.dev/graphql/envelop/plugins/use-generic-auth#getting-started @@ -24,21 +20,11 @@ const resolveUser: ResolveUserFn = async ( .get("authorization") ?.split("Bearer ")[1]; - console.log("SessionToken:", sessionToken); - if (!sessionToken) throw new Error("Invalid or missing session token"); const jwks = jose.createRemoteJWKSet(new URL(AUTH_JWKS_URL!)); - // const { payload } = await jose.jwtVerify(sessionToken, jwks); - // TODO replace below with above once (LINK) - const { payload } = await jose.jwtVerify( - sessionToken, - new TextEncoder().encode(SECRET), - { algorithms: [ALGORITHM] }, - ); - - console.log("Payload:", payload); + const { payload } = await jose.jwtVerify(sessionToken, jwks); if (!payload) throw new Error("Invalid or missing session token"); From 8ab5fb73c9ef91c58e603f42a6afa8c0188ec48d Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Sat, 29 Mar 2025 21:09:41 -0500 Subject: [PATCH 09/29] chore: add TODO --- .env.production | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.production b/.env.production index 2b3f26b..5f9585b 100644 --- a/.env.production +++ b/.env.production @@ -1 +1,2 @@ +# TODO change once base path changes AUTH_JWKS_URL="https://identity.omni.dev/api/auth/jwks" From 3559227c1ee956db2f04361e7b9bcbd33b79d307 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Sat, 29 Mar 2025 21:10:20 -0500 Subject: [PATCH 10/29] chore: add TODO --- .env.development | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.development b/.env.development index 2bb6cda..8cfc884 100644 --- a/.env.development +++ b/.env.development @@ -1 +1,2 @@ +# TODO change once base path changes AUTH_JWKS_URL="https://localhost:8000/api/auth/jwks" From 068e7426cfb88943f08886e25db263696d00a191 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Sat, 29 Mar 2025 21:19:42 -0500 Subject: [PATCH 11/29] refactor(use-auth): handle opaque access token by fetching from OIDC userinfo --- src/lib/plugins/envelop/useAuth.plugin.ts | 28 ++++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/lib/plugins/envelop/useAuth.plugin.ts b/src/lib/plugins/envelop/useAuth.plugin.ts index c24773c..da24edc 100644 --- a/src/lib/plugins/envelop/useAuth.plugin.ts +++ b/src/lib/plugins/envelop/useAuth.plugin.ts @@ -1,7 +1,7 @@ import { useGenericAuth } from "@envelop/generic-auth"; import * as jose from "jose"; -import { AUTH_JWKS_URL } from "lib/config/env"; +// import { AUTH_JWKS_URL } from "lib/config/env"; import { users } from "lib/drizzle/schema"; import type { ResolveUserFn } from "@envelop/generic-auth"; @@ -22,17 +22,29 @@ const resolveUser: ResolveUserFn = async ( if (!sessionToken) throw new Error("Invalid or missing session token"); - const jwks = jose.createRemoteJWKSet(new URL(AUTH_JWKS_URL!)); + // TODO verify best practices for this + const userInfo = await fetch( + // TODO env var + "https://localhost:8000/api/auth/oauth2/userinfo", + { + headers: { + Authorization: `Bearer ${sessionToken}`, + }, + }, + ); - const { payload } = await jose.jwtVerify(sessionToken, jwks); + const idToken: jose.JWTPayload = await userInfo.json(); - if (!payload) throw new Error("Invalid or missing session token"); + // TODO validate token, currently major security flaw + // const jwks = jose.createRemoteJWKSet(new URL(AUTH_JWKS_URL!)); + // const { payload } = await jose.jwtVerify(sessionToken, jwks); + // if (!payload) throw new Error("Invalid or missing session token"); const insertedUser: InsertUser = { - hidraId: payload.sub!, - username: payload.preferred_username as string, - firstName: payload.given_name as string, - lastName: payload.family_name as string, + hidraId: idToken.sub!, + username: idToken.preferred_username as string, + firstName: idToken.given_name as string, + lastName: idToken.family_name as string, }; const { hidraId, ...rest } = insertedUser; From 978be7f8b543115c610fa6f2b65c799901531559 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Sat, 29 Mar 2025 21:20:43 -0500 Subject: [PATCH 12/29] chore: set type import --- src/lib/plugins/envelop/useAuth.plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/plugins/envelop/useAuth.plugin.ts b/src/lib/plugins/envelop/useAuth.plugin.ts index da24edc..288bd27 100644 --- a/src/lib/plugins/envelop/useAuth.plugin.ts +++ b/src/lib/plugins/envelop/useAuth.plugin.ts @@ -1,5 +1,5 @@ import { useGenericAuth } from "@envelop/generic-auth"; -import * as jose from "jose"; +import type * as jose from "jose"; // import { AUTH_JWKS_URL } from "lib/config/env"; import { users } from "lib/drizzle/schema"; From 058f9e5ee323852bedca3a4083e25031f2cdff7b Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Sun, 30 Mar 2025 01:23:43 -0500 Subject: [PATCH 13/29] build(deps): upgrade dependencies --- bun.lock | 164 ++++++++++++++++++++++++++++++++++++--------------- package.json | 32 +++++----- 2 files changed, 131 insertions(+), 65 deletions(-) diff --git a/bun.lock b/bun.lock index 364599b..008665f 100644 --- a/bun.lock +++ b/bun.lock @@ -3,34 +3,34 @@ "workspaces": { "": { "dependencies": { - "@envelop/generic-auth": "^8.0.1", + "@envelop/generic-auth": "^9.1.3", "@envelop/parser-cache": "^8.1.3", "@envelop/validation-cache": "^8.1.3", "@escape.tech/graphql-armor": "^3.1.2", "@graphile/pg-aggregates": "0.2.0-beta.7", "@graphile/simplify-inflection": "8.0.0-beta.5", "dayjs": "^1.11.13", - "drizzle-orm": "^0.38.2", - "drizzle-seed": "^0.3.0", + "drizzle-orm": "^0.41.0", + "drizzle-seed": "^0.3.1", "graphile-export": "0.0.2-beta.24", - "graphql": "^16.9.0", - "graphql-yoga": "^5.8.0", - "hono": "^4.6.8", - "jose": "^5.9.6", - "pg": "^8.13.1", + "graphql": "^16.10.0", + "graphql-yoga": "^5.13.2", + "hono": "^4.7.5", + "jose": "^6.0.10", + "pg": "^8.14.1", "postgraphile": "5.0.0-beta.37", "postgraphile-plugin-connection-filter": "3.0.0-beta.7", }, "devDependencies": { "@biomejs/biome": "^1.9.4", - "@faker-js/faker": "^9.1.0", - "@types/bun": "^1.1.12", - "@types/node": "^22.8.6", - "@types/pg": "^8.11.10", - "drizzle-kit": "^0.30.1", - "husky": "^9.1.6", - "replace-in-file": "^8.2.0", - "typescript": "^5.6.3", + "@faker-js/faker": "^9.6.0", + "@types/bun": "^1.2.8", + "@types/node": "^22.13.14", + "@types/pg": "^8.11.11", + "drizzle-kit": "^0.30.6", + "husky": "^9.1.7", + "replace-in-file": "^8.3.0", + "typescript": "^5.8.2", }, }, }, @@ -83,15 +83,17 @@ "@emotion/memoize": ["@emotion/memoize@0.9.0", "", {}, "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ=="], - "@envelop/core": ["@envelop/core@5.0.2", "", { "dependencies": { "@envelop/types": "5.0.0", "tslib": "^2.5.0" } }, "sha512-tVL6OrMe6UjqLosiE+EH9uxh2TQC0469GwF4tE014ugRaDDKKVWwFwZe0TBMlcyHKh5MD4ZxktWo/1hqUxIuhw=="], + "@envelop/core": ["@envelop/core@5.2.3", "", { "dependencies": { "@envelop/instrumentation": "^1.0.0", "@envelop/types": "^5.2.1", "@whatwg-node/promise-helpers": "^1.2.4", "tslib": "^2.5.0" } }, "sha512-KfoGlYD/XXQSc3BkM1/k15+JQbkQ4ateHazeZoWl9P71FsLTDXSjGy6j7QqfhpIDSbxNISqhPMfZHYSbDFOofQ=="], - "@envelop/extended-validation": ["@envelop/extended-validation@4.1.0", "", { "dependencies": { "@graphql-tools/utils": "^10.0.0", "tslib": "^2.5.0" }, "peerDependencies": { "@envelop/core": "^5.0.2", "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" } }, "sha512-S90LQanW+xg3Lkp2sNiHa2KJnXXpKLucKys05Wk5zpiV0vL0SDX+/cuV+tnDhShWJucunAGi34n8xFCXsUUOkA=="], + "@envelop/extended-validation": ["@envelop/extended-validation@5.1.3", "", { "dependencies": { "@graphql-tools/utils": "^10.0.0", "tslib": "^2.5.0" }, "peerDependencies": { "@envelop/core": "^5.2.3", "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" } }, "sha512-mp7CCN+KNp375FEFN3gRdl7M8rqdmqOUfUIEHkP6O7injeuxd86nbFuS4f/uJGcTubFOaCs1IKIFBcuYZk33iQ=="], - "@envelop/generic-auth": ["@envelop/generic-auth@8.0.1", "", { "dependencies": { "@envelop/extended-validation": "^4.1.0", "@graphql-tools/executor": "^1.3.6", "@graphql-tools/utils": "^10.5.1", "tslib": "^2.5.0" }, "peerDependencies": { "@envelop/core": "^5.0.2", "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" } }, "sha512-QznhYwj1Ri8Afkc6djtBTWI28xMdmKUxyqLc85XfpjxVnKrGcd8jdgV08SKiRQC29AH/rhSZprt6vXAXIsqRJA=="], + "@envelop/generic-auth": ["@envelop/generic-auth@9.1.3", "", { "dependencies": { "@envelop/extended-validation": "^5.1.3", "@graphql-tools/executor": "^1.3.6", "@graphql-tools/utils": "^10.5.1", "@whatwg-node/promise-helpers": "^1.2.1", "tslib": "^2.5.0" }, "peerDependencies": { "@envelop/core": "^5.2.3", "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" } }, "sha512-HH8X0qcz4lb1xQfG4LhXbvwUU0oWiwBdLNKbjJo6JL2frYXFWCQNUbkIzQL7S64+ZOuTU0LnTSVucyI2Nd0Hqw=="], + + "@envelop/instrumentation": ["@envelop/instrumentation@1.0.0", "", { "dependencies": { "@whatwg-node/promise-helpers": "^1.2.1", "tslib": "^2.5.0" } }, "sha512-cxgkB66RQB95H3X27jlnxCRNTmPuSTgmBAq6/4n2Dtv4hsk4yz8FadA1ggmd0uZzvKqWD6CR+WFgTjhDqg7eyw=="], "@envelop/parser-cache": ["@envelop/parser-cache@8.1.3", "", { "dependencies": { "lru-cache": "^10.0.0", "tslib": "^2.5.0" }, "peerDependencies": { "@envelop/core": "^5.2.3", "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" } }, "sha512-JOKf8bL999DyZ1j8Ugka4xmbAoGaTRlArXf34fM4Vx7TfsapwwEaLPqdG/tA9921HvCZLlFfcimk7+Q06ujK4g=="], - "@envelop/types": ["@envelop/types@5.0.0", "", { "dependencies": { "tslib": "^2.5.0" } }, "sha512-IPjmgSc4KpQRlO4qbEDnBEixvtb06WDmjKfi/7fkZaryh5HuOmTtixe1EupQI5XfXO8joc3d27uUZ0QdC++euA=="], + "@envelop/types": ["@envelop/types@5.2.1", "", { "dependencies": { "@whatwg-node/promise-helpers": "^1.0.0", "tslib": "^2.5.0" } }, "sha512-CsFmA3u3c2QoLDTfEpGr4t25fjMU31nyvse7IzWTvb0ZycuPjMjb0fjlheh+PbhBYb9YLugnT2uY6Mwcg1o+Zg=="], "@envelop/validation-cache": ["@envelop/validation-cache@8.1.3", "", { "dependencies": { "hash-it": "^6.0.0", "lru-cache": "^10.0.0", "tslib": "^2.5.0" }, "peerDependencies": { "@envelop/core": "^5.2.3", "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" } }, "sha512-npsHXijQi2cNSpHQLnYLdsmembh72kj+d9L9qNqIRgPAgNCsTsEE6lBUjhcgudc0XOQW2cvmsSW1E3MBEBZt5w=="], @@ -161,7 +163,7 @@ "@escape.tech/graphql-armor-types": ["@escape.tech/graphql-armor-types@0.7.0", "", { "dependencies": { "graphql": "^16.0.0" } }, "sha512-RHxyyp6PDgS6NAPnnmB6JdmUJ6oqhpSHFbsglGWeCcnNzceA5AkQFpir7VIDbVyS8LNC1xhipOtk7f9ycrIemQ=="], - "@faker-js/faker": ["@faker-js/faker@9.3.0", "", {}, "sha512-r0tJ3ZOkMd9xsu3VRfqlFR6cz0V/jFYRswAIpC+m/DIfAUXq7g8N7wTAlhSANySXYGKzGryfDXwtwsY8TxEIDw=="], + "@faker-js/faker": ["@faker-js/faker@9.6.0", "", {}, "sha512-3vm4by+B5lvsFPSyep3ELWmZfE3kicDtmemVpuwl1yH7tqtnHdsA6hG8fbXedMVdkzgtvzWoRgjSB4Q+FHnZiw=="], "@graphile/lru": ["@graphile/lru@5.0.0-beta.3", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-atoHRmLuYMCoMeCjS1pIA442eqAHwFZ3+bnjm3Mn+kAvujyXzGs8uup39gfmMgxOFjRAPNmPEiPw2oJUbOk65Q=="], @@ -179,11 +181,11 @@ "@graphql-typed-document-node/core": ["@graphql-typed-document-node/core@3.2.0", "", { "peerDependencies": { "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ=="], - "@graphql-yoga/logger": ["@graphql-yoga/logger@2.0.0", "", { "dependencies": { "tslib": "^2.5.2" } }, "sha512-Mg8psdkAp+YTG1OGmvU+xa6xpsAmSir0hhr3yFYPyLNwzUj95DdIwsMpKadDj9xDpYgJcH3Hp/4JMal9DhQimA=="], + "@graphql-yoga/logger": ["@graphql-yoga/logger@2.0.1", "", { "dependencies": { "tslib": "^2.8.1" } }, "sha512-Nv0BoDGLMg9QBKy9cIswQ3/6aKaKjlTh87x3GiBg2Z4RrjyrM48DvOOK0pJh1C1At+b0mUIM67cwZcFTDLN4sA=="], - "@graphql-yoga/subscription": ["@graphql-yoga/subscription@5.0.2", "", { "dependencies": { "@graphql-yoga/typed-event-target": "^3.0.1", "@repeaterjs/repeater": "^3.0.4", "@whatwg-node/events": "^0.1.0", "tslib": "^2.5.2" } }, "sha512-KGacW1FtUXR5e3qk4YmEFQRGTov8lOkpW7syjTD3EN2t5HRWrSsut2LwjVdK+HcP3H9UEuZ9RXw/+shqV+1exQ=="], + "@graphql-yoga/subscription": ["@graphql-yoga/subscription@5.0.3", "", { "dependencies": { "@graphql-yoga/typed-event-target": "^3.0.2", "@repeaterjs/repeater": "^3.0.4", "@whatwg-node/events": "^0.1.0", "tslib": "^2.8.1" } }, "sha512-xLGEataxCULjL9rlTCVFL1IW2E90TnDIL+mE4lZBi9X92jc6s+Q+jk6Ax3I98kryCJh0UMiwjit7CaIIczTiJg=="], - "@graphql-yoga/typed-event-target": ["@graphql-yoga/typed-event-target@3.0.1", "", { "dependencies": { "@repeaterjs/repeater": "^3.0.4", "tslib": "^2.5.2" } }, "sha512-SWVkyFivzlDqGTBrGTWTNg+aFGP/cIiotirUFnvwuUGt2gla6UJoKhII6aPoHNg3/5vpUAL1KzyoaXMK2PO0JA=="], + "@graphql-yoga/typed-event-target": ["@graphql-yoga/typed-event-target@3.0.2", "", { "dependencies": { "@repeaterjs/repeater": "^3.0.4", "tslib": "^2.8.1" } }, "sha512-ZpJxMqB+Qfe3rp6uszCQoag4nSw42icURnBRfFYSOmTgEeOe4rD0vYlbA8spvCu2TlCesNTlEN9BLWtQqLxabA=="], "@isaacs/cliui": ["@isaacs/cliui@8.0.2", "", { "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" } }, "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA=="], @@ -197,7 +199,7 @@ "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="], - "@kamilkisiela/fast-url-parser": ["@kamilkisiela/fast-url-parser@1.1.4", "", {}, "sha512-gbkePEBupNydxCelHCESvFSFM8XPh1Zs/OAVRW/rKpEqPAl5PbOM90Si8mv9bvnR53uPD2s/FiRxdvSejpRJew=="], + "@petamoriken/float16": ["@petamoriken/float16@3.9.2", "", {}, "sha512-VgffxawQde93xKxT3qap3OH+meZf7VaSB5Sqd4Rqc+FP5alWbpOyan/7tRbOAvynjpG3GpdtAuGU/NdhQpmrog=="], "@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="], @@ -205,13 +207,13 @@ "@tsconfig/node20": ["@tsconfig/node20@20.1.4", "", {}, "sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg=="], - "@types/bun": ["@types/bun@1.1.14", "", { "dependencies": { "bun-types": "1.1.37" } }, "sha512-opVYiFGtO2af0dnWBdZWlioLBoxSdDO5qokaazLhq8XQtGZbY4pY3/JxY8Zdf/hEwGubbp7ErZXoN1+h2yesxA=="], + "@types/bun": ["@types/bun@1.2.8", "", { "dependencies": { "bun-types": "1.2.7" } }, "sha512-t8L1RvJVUghW5V+M/fL3Thbxcs0HwNsXsnTEBEfEVqGteiJToOlZ/fyOEaR1kZsNqnu+3XA4RI/qmnX4w6+S+w=="], "@types/interpret": ["@types/interpret@1.1.3", "", { "dependencies": { "@types/node": "*" } }, "sha512-uBaBhj/BhilG58r64mtDb/BEdH51HIQLgP5bmWzc5qCtFMja8dCk/IOJmk36j0lbi9QHwI6sbtUNGuqXdKCAtQ=="], - "@types/node": ["@types/node@22.10.4", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-99l6wv4HEzBQhvaU/UGoeBoCK61SCROQaCCGyQSgX2tEQ3rKkNZ2S7CEWnS/4s1LV+8ODdK21UeyR1fHP2mXug=="], + "@types/node": ["@types/node@22.13.14", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w=="], - "@types/pg": ["@types/pg@8.11.10", "", { "dependencies": { "@types/node": "*", "pg-protocol": "*", "pg-types": "^4.0.1" } }, "sha512-LczQUW4dbOQzsH2RQ5qoeJ6qJPdrcM/DcMLoqWQkMLMsq83J5lAX3LXjdkWdpscFy67JSOWDnh7Ny/sPFykmkg=="], + "@types/pg": ["@types/pg@8.11.11", "", { "dependencies": { "@types/node": "*", "pg-protocol": "*", "pg-types": "^4.0.1" } }, "sha512-kGT1qKM8wJQ5qlawUrEkXgvMSXoV213KfMGXcwfDwUIfUHXqXYXOfS1nE1LINRJVVVx5wCm70XnFlMHaIcQAfw=="], "@types/pluralize": ["@types/pluralize@0.0.30", "", {}, "sha512-kVww6xZrW/db5BR9OqiT71J9huRdQ+z/r+LbDuT7/EK50mCmj5FoaIARnVv0rvjUS/YpDox0cDU9lpQT011VBA=="], @@ -223,11 +225,13 @@ "@whatwg-node/events": ["@whatwg-node/events@0.1.2", "", { "dependencies": { "tslib": "^2.6.3" } }, "sha512-ApcWxkrs1WmEMS2CaLLFUEem/49erT3sxIVjpzU5f6zmVcnijtDSrhoK2zVobOIikZJdH63jdAXOrvjf6eOUNQ=="], - "@whatwg-node/fetch": ["@whatwg-node/fetch@0.10.1", "", { "dependencies": { "@whatwg-node/node-fetch": "^0.7.1", "urlpattern-polyfill": "^10.0.0" } }, "sha512-gmPOLrsjSZWEZlr9Oe5+wWFBq3CG6fN13rGlM91Jsj/vZ95G9CCvrORGBAxMXy0AJGiC83aYiHXn3JzTzXQmbA=="], + "@whatwg-node/fetch": ["@whatwg-node/fetch@0.10.5", "", { "dependencies": { "@whatwg-node/node-fetch": "^0.7.11", "urlpattern-polyfill": "^10.0.0" } }, "sha512-+yFJU3hmXPAHJULwx0VzCIsvr/H0lvbPvbOH3areOH3NAuCxCwaJsQ8w6/MwwMcvEWIynSsmAxoyaH04KeosPg=="], + + "@whatwg-node/node-fetch": ["@whatwg-node/node-fetch@0.7.17", "", { "dependencies": { "@whatwg-node/disposablestack": "^0.0.6", "@whatwg-node/promise-helpers": "^1.2.5", "busboy": "^1.6.0", "tslib": "^2.6.3" } }, "sha512-Ni8A2H/r6brNf4u8Y7ATxmWUD0xltsQ6a4NnjWSbw4PgaT34CbY+u4QtVsFj9pTC3dBKJADKjac3AieAig+PZA=="], - "@whatwg-node/node-fetch": ["@whatwg-node/node-fetch@0.7.5", "", { "dependencies": { "@kamilkisiela/fast-url-parser": "^1.1.4", "@whatwg-node/disposablestack": "^0.0.5", "busboy": "^1.6.0", "fast-querystring": "^1.1.1", "tslib": "^2.6.3" } }, "sha512-t7kGrt2fdfNvzy1LCAE9/OnIyMtizgFhgJmk7iLJwQsLmR7S86F8Q4aDRPbCfo7pISJP6Fx/tPdfFNjHS23WTA=="], + "@whatwg-node/promise-helpers": ["@whatwg-node/promise-helpers@1.3.0", "", { "dependencies": { "tslib": "^2.6.3" } }, "sha512-486CouizxHXucj8Ky153DDragfkMcHtVEToF5Pn/fInhUUSiCmt9Q4JVBa6UK5q4RammFBtGQ4C9qhGlXU9YbA=="], - "@whatwg-node/server": ["@whatwg-node/server@0.9.65", "", { "dependencies": { "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/fetch": "^0.10.0", "tslib": "^2.6.3" } }, "sha512-CnYTFEUJkbbAcuBXnXirVIgKBfs2YA6sSGjxeq07AUiyXuoQ0fbvTIQoteMglmn09QeGzcH/l0B7nIml83xvVw=="], + "@whatwg-node/server": ["@whatwg-node/server@0.10.3", "", { "dependencies": { "@envelop/instrumentation": "^1.0.0", "@whatwg-node/disposablestack": "^0.0.6", "@whatwg-node/fetch": "^0.10.5", "@whatwg-node/promise-helpers": "^1.2.3", "tslib": "^2.6.3" } }, "sha512-2Dnfey57vWR+hDUMjPhNzJQc9z116BBzSQwR9eD0vhnzYmN2rJXuY0QuMaHDCCqEZRmFHg2bo8iJ+/1uHOlxpg=="], "ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], @@ -241,7 +245,7 @@ "buffer-from": ["buffer-from@1.1.2", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="], - "bun-types": ["bun-types@1.1.37", "", { "dependencies": { "@types/node": "~20.12.8", "@types/ws": "~8.5.10" } }, "sha512-C65lv6eBr3LPJWFZ2gswyrGZ82ljnH8flVE03xeXxKhi2ZGtFiO4isRKTKnitbSqtRAcaqYSR6djt1whI66AbA=="], + "bun-types": ["bun-types@1.2.7", "", { "dependencies": { "@types/node": "*", "@types/ws": "*" } }, "sha512-P4hHhk7kjF99acXqKvltyuMQ2kf/rzIw3ylEDpCxDS9Xa0X0Yp/gJu/vDCucmWpiur5qJ0lwB2bWzOXa2GlHqA=="], "busboy": ["busboy@1.6.0", "", { "dependencies": { "streamsearch": "^1.1.0" } }, "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA=="], @@ -261,11 +265,11 @@ "debug": ["debug@4.4.0", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA=="], - "drizzle-kit": ["drizzle-kit@0.30.1", "", { "dependencies": { "@drizzle-team/brocli": "^0.10.2", "@esbuild-kit/esm-loader": "^2.5.5", "esbuild": "^0.19.7", "esbuild-register": "^3.5.0" }, "bin": { "drizzle-kit": "bin.cjs" } }, "sha512-HmA/NeewvHywhJ2ENXD3KvOuM/+K2dGLJfxVfIHsGwaqKICJnS+Ke2L6UcSrSrtMJLJaT0Im1Qv4TFXfaZShyw=="], + "drizzle-kit": ["drizzle-kit@0.30.6", "", { "dependencies": { "@drizzle-team/brocli": "^0.10.2", "@esbuild-kit/esm-loader": "^2.5.5", "esbuild": "^0.19.7", "esbuild-register": "^3.5.0", "gel": "^2.0.0" }, "bin": { "drizzle-kit": "bin.cjs" } }, "sha512-U4wWit0fyZuGuP7iNmRleQyK2V8wCuv57vf5l3MnG4z4fzNTjY/U13M8owyQ5RavqvqxBifWORaR3wIUzlN64g=="], - "drizzle-orm": ["drizzle-orm@0.38.3", "", { "peerDependencies": { "@aws-sdk/client-rds-data": ">=3", "@cloudflare/workers-types": ">=4", "@electric-sql/pglite": ">=0.2.0", "@libsql/client": ">=0.10.0", "@libsql/client-wasm": ">=0.10.0", "@neondatabase/serverless": ">=0.10.0", "@op-engineering/op-sqlite": ">=2", "@opentelemetry/api": "^1.4.1", "@planetscale/database": ">=1", "@prisma/client": "*", "@tidbcloud/serverless": "*", "@types/better-sqlite3": "*", "@types/pg": "*", "@types/react": ">=18", "@types/sql.js": "*", "@vercel/postgres": ">=0.8.0", "@xata.io/client": "*", "better-sqlite3": ">=7", "bun-types": "*", "expo-sqlite": ">=14.0.0", "knex": "*", "kysely": "*", "mysql2": ">=2", "pg": ">=8", "postgres": ">=3", "react": ">=18", "sql.js": ">=1", "sqlite3": ">=5" }, "optionalPeers": ["@aws-sdk/client-rds-data", "@cloudflare/workers-types", "@electric-sql/pglite", "@libsql/client", "@libsql/client-wasm", "@neondatabase/serverless", "@op-engineering/op-sqlite", "@opentelemetry/api", "@planetscale/database", "@prisma/client", "@tidbcloud/serverless", "@types/better-sqlite3", "@types/pg", "@types/react", "@types/sql.js", "@vercel/postgres", "@xata.io/client", "better-sqlite3", "bun-types", "expo-sqlite", "knex", "kysely", "mysql2", "pg", "postgres", "react", "sql.js", "sqlite3"] }, "sha512-w41Y+PquMpSff/QDRGdItG0/aWca+/J3Sda9PPGkTxBtjWQvgU1jxlFBXdjog5tYvTu58uvi3PwR1NuCx0KeZg=="], + "drizzle-orm": ["drizzle-orm@0.41.0", "", { "peerDependencies": { "@aws-sdk/client-rds-data": ">=3", "@cloudflare/workers-types": ">=4", "@electric-sql/pglite": ">=0.2.0", "@libsql/client": ">=0.10.0", "@libsql/client-wasm": ">=0.10.0", "@neondatabase/serverless": ">=0.10.0", "@op-engineering/op-sqlite": ">=2", "@opentelemetry/api": "^1.4.1", "@planetscale/database": ">=1", "@prisma/client": "*", "@tidbcloud/serverless": "*", "@types/better-sqlite3": "*", "@types/pg": "*", "@types/sql.js": "*", "@vercel/postgres": ">=0.8.0", "@xata.io/client": "*", "better-sqlite3": ">=7", "bun-types": "*", "expo-sqlite": ">=14.0.0", "gel": ">=2", "knex": "*", "kysely": "*", "mysql2": ">=2", "pg": ">=8", "postgres": ">=3", "sql.js": ">=1", "sqlite3": ">=5" }, "optionalPeers": ["@aws-sdk/client-rds-data", "@cloudflare/workers-types", "@electric-sql/pglite", "@libsql/client", "@libsql/client-wasm", "@neondatabase/serverless", "@op-engineering/op-sqlite", "@opentelemetry/api", "@planetscale/database", "@prisma/client", "@tidbcloud/serverless", "@types/better-sqlite3", "@types/pg", "@types/sql.js", "@vercel/postgres", "@xata.io/client", "better-sqlite3", "bun-types", "expo-sqlite", "gel", "knex", "kysely", "mysql2", "pg", "postgres", "sql.js", "sqlite3"] }, "sha512-7A4ZxhHk9gdlXmTdPj/lREtP+3u8KvZ4yEN6MYVxBzZGex5Wtdc+CWSbu7btgF6TB0N+MNPrvW7RKBbxJchs/Q=="], - "drizzle-seed": ["drizzle-seed@0.3.0", "", { "dependencies": { "pure-rand": "^6.1.0" }, "peerDependencies": { "drizzle-orm": ">=0.36.4" }, "optionalPeers": ["drizzle-orm"] }, "sha512-8WSt1WdtYWqClsCxKeAmU/bw8X+weYtuA/h8M3gVc8LiHU2AZX5ZUnvUxwdBsP+SkN26ARGhmU0XIJ2OEmHmfA=="], + "drizzle-seed": ["drizzle-seed@0.3.1", "", { "dependencies": { "pure-rand": "^6.1.0" }, "peerDependencies": { "drizzle-orm": ">=0.36.4" }, "optionalPeers": ["drizzle-orm"] }, "sha512-F/0lgvfOAsqlYoHM/QAGut4xXIOXoE5VoAdv2FIl7DpGYVXlAzKuJO+IphkKUFK3Dz+rFlOsQLnMNrvoQ0cx7g=="], "dset": ["dset@3.1.4", "", {}, "sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA=="], @@ -275,6 +279,8 @@ "emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], + "env-paths": ["env-paths@3.0.0", "", {}, "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A=="], + "esbuild": ["esbuild@0.19.12", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.19.12", "@esbuild/android-arm": "0.19.12", "@esbuild/android-arm64": "0.19.12", "@esbuild/android-x64": "0.19.12", "@esbuild/darwin-arm64": "0.19.12", "@esbuild/darwin-x64": "0.19.12", "@esbuild/freebsd-arm64": "0.19.12", "@esbuild/freebsd-x64": "0.19.12", "@esbuild/linux-arm": "0.19.12", "@esbuild/linux-arm64": "0.19.12", "@esbuild/linux-ia32": "0.19.12", "@esbuild/linux-loong64": "0.19.12", "@esbuild/linux-mips64el": "0.19.12", "@esbuild/linux-ppc64": "0.19.12", "@esbuild/linux-riscv64": "0.19.12", "@esbuild/linux-s390x": "0.19.12", "@esbuild/linux-x64": "0.19.12", "@esbuild/netbsd-x64": "0.19.12", "@esbuild/openbsd-x64": "0.19.12", "@esbuild/sunos-x64": "0.19.12", "@esbuild/win32-arm64": "0.19.12", "@esbuild/win32-ia32": "0.19.12", "@esbuild/win32-x64": "0.19.12" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg=="], "esbuild-register": ["esbuild-register@3.6.0", "", { "dependencies": { "debug": "^4.3.4" }, "peerDependencies": { "esbuild": ">=0.12 <1" } }, "sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg=="], @@ -283,14 +289,12 @@ "eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], - "fast-decode-uri-component": ["fast-decode-uri-component@1.0.1", "", {}, "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg=="], - - "fast-querystring": ["fast-querystring@1.1.2", "", { "dependencies": { "fast-decode-uri-component": "^1.0.1" } }, "sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg=="], - "follow-redirects": ["follow-redirects@1.15.9", "", {}, "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ=="], "foreground-child": ["foreground-child@3.3.0", "", { "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" } }, "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg=="], + "gel": ["gel@2.0.1", "", { "dependencies": { "@petamoriken/float16": "^3.8.7", "debug": "^4.3.4", "env-paths": "^3.0.0", "semver": "^7.6.2", "shell-quote": "^1.8.1", "which": "^4.0.0" }, "bin": { "gel": "dist/cli.mjs" } }, "sha512-gfem3IGvqKqXwEq7XseBogyaRwGsQGuE7Cw/yQsjLGdgiyqX92G1xENPCE0ltunPGcsJIa6XBOTx/PK169mOqw=="], + "get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="], "get-tsconfig": ["get-tsconfig@4.8.1", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg=="], @@ -317,13 +321,13 @@ "graphql-ws": ["graphql-ws@5.16.0", "", { "peerDependencies": { "graphql": ">=0.11 <=16" } }, "sha512-Ju2RCU2dQMgSKtArPbEtsK5gNLnsQyTNIo/T7cZNp96niC1x0KdJNZV0TIoilceBPQwfb5itrGl8pkFeOUMl4A=="], - "graphql-yoga": ["graphql-yoga@5.10.8", "", { "dependencies": { "@envelop/core": "^5.0.2", "@graphql-tools/executor": "^1.3.7", "@graphql-tools/schema": "^10.0.11", "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/logger": "^2.0.0", "@graphql-yoga/subscription": "^5.0.2", "@whatwg-node/fetch": "^0.10.1", "@whatwg-node/server": "^0.9.64", "dset": "^3.1.1", "lru-cache": "^10.0.0", "tslib": "^2.8.1" }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0" } }, "sha512-a3qJOd7t/sWp6yQ0n+M/7KmhGRm6ulSeY7WTdyb/pPCZGccPW9iLz4O2k0DPsF50k8VHJLS2VSlnZOeqkR2mOg=="], + "graphql-yoga": ["graphql-yoga@5.13.2", "", { "dependencies": { "@envelop/core": "^5.2.3", "@envelop/instrumentation": "^1.0.0", "@graphql-tools/executor": "^1.4.0", "@graphql-tools/schema": "^10.0.11", "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/logger": "^2.0.1", "@graphql-yoga/subscription": "^5.0.3", "@whatwg-node/fetch": "^0.10.5", "@whatwg-node/promise-helpers": "^1.2.4", "@whatwg-node/server": "^0.10.1", "dset": "^3.1.4", "lru-cache": "^10.0.0", "tslib": "^2.8.1" }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0" } }, "sha512-ZXhIoAPCV2K2ozwpxDL1ZXhhI2SvIp3hJMaSRaHcojLGE9w9iV8oYGPnZKcV5eisF3VE13RcIF4Ys6TTkU338Q=="], "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], "hash-it": ["hash-it@6.0.0", "", {}, "sha512-KHzmSFx1KwyMPw0kXeeUD752q/Kfbzhy6dAZrjXV9kAIXGqzGvv8vhkUqj+2MGZldTo0IBpw6v7iWE7uxsvH0w=="], - "hono": ["hono@4.6.15", "", {}, "sha512-OiQwvAOAaI2JrABBH69z5rsctHDzFzIKJge0nYXgtzGJ0KftwLWcBXm1upJC23/omNRtnqM0gjRMbtXshPdqhQ=="], + "hono": ["hono@4.7.5", "", {}, "sha512-fDOK5W2C1vZACsgLONigdZTRZxuBqFtcKh7bUQ5cVSbwI2RWjloJDcgFOVzbQrlI6pCmhlTsVYZ7zpLj4m4qMQ=="], "http-proxy": ["http-proxy@1.18.1", "", { "dependencies": { "eventemitter3": "^4.0.0", "follow-redirects": "^1.0.0", "requires-port": "^1.0.0" } }, "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ=="], @@ -333,13 +337,13 @@ "is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], - "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], + "isexe": ["isexe@3.1.1", "", {}, "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ=="], "iterall": ["iterall@1.3.0", "", {}, "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg=="], "jackspeak": ["jackspeak@3.4.3", "", { "dependencies": { "@isaacs/cliui": "^8.0.2" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw=="], - "jose": ["jose@5.9.6", "", {}, "sha512-AMlnetc9+CV9asI19zHmrgS/WYsWUwCn2R7RzlbJWD7F9eWYUTGyBmU9o6PxngtLGOiDGPRu+Uc4fhKzbpteZQ=="], + "jose": ["jose@6.0.10", "", {}, "sha512-skIAxZqcMkOrSwjJvplIPYrlXGpxTPnro2/QWTDCxAdWQrSTV5/KqspMWmi5WAx5+ULswASJiZ0a+1B/Lxt9cw=="], "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], @@ -385,7 +389,7 @@ "path-scurry": ["path-scurry@1.11.1", "", { "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" } }, "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA=="], - "pg": ["pg@8.13.1", "", { "dependencies": { "pg-connection-string": "^2.7.0", "pg-pool": "^3.7.0", "pg-protocol": "^1.7.0", "pg-types": "^2.1.0", "pgpass": "1.x" }, "optionalDependencies": { "pg-cloudflare": "^1.1.1" }, "peerDependencies": { "pg-native": ">=3.0.1" }, "optionalPeers": ["pg-native"] }, "sha512-OUir1A0rPNZlX//c7ksiu7crsGZTKSOXJPgtNiHGIlC9H0lO+NC6ZDYksSgBYY/thSWhnSRBv8w1lieNNGATNQ=="], + "pg": ["pg@8.14.1", "", { "dependencies": { "pg-connection-string": "^2.7.0", "pg-pool": "^3.8.0", "pg-protocol": "^1.8.0", "pg-types": "^2.1.0", "pgpass": "1.x" }, "optionalDependencies": { "pg-cloudflare": "^1.1.1" }, "peerDependencies": { "pg-native": ">=3.0.1" }, "optionalPeers": ["pg-native"] }, "sha512-0TdbqfjwIun9Fm/r89oB7RFQ0bLgduAhiIqIXOsyKoiC/L54DbuAAzIEN/9Op0f1Po9X7iCPXGoa/Ah+2aI8Xw=="], "pg-cloudflare": ["pg-cloudflare@1.1.1", "", {}, "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q=="], @@ -397,7 +401,7 @@ "pg-numeric": ["pg-numeric@1.0.2", "", {}, "sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw=="], - "pg-pool": ["pg-pool@3.7.0", "", { "peerDependencies": { "pg": ">=8.0" } }, "sha512-ZOBQForurqh4zZWjrgSwwAtzJ7QiRX0ovFkZr2klsen3Nm0aoh33Ls0fzfv3imeH/nw/O27cjdz5kzYJfeGp/g=="], + "pg-pool": ["pg-pool@3.8.0", "", { "peerDependencies": { "pg": ">=8.0" } }, "sha512-VBw3jiVm6ZOdLBTIcXLNdSotb6Iy3uOCwDGFAksZCXmi10nyRvnP2v3jl4d+IsLYRyXf6o9hIm/ZtUzlByNUdw=="], "pg-protocol": ["pg-protocol@1.7.0", "", {}, "sha512-hTK/mE36i8fDDhgDFjy6xNOG+LCorxLG3WO17tku+ij6sVHXh1jQUJ8hYAnRhNla4QVD2H8er/FOjc/+EgC6yQ=="], @@ -447,6 +451,8 @@ "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], + "shell-quote": ["shell-quote@1.8.2", "", {}, "sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA=="], + "signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], "source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], @@ -471,7 +477,7 @@ "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - "typescript": ["typescript@5.7.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg=="], + "typescript": ["typescript@5.8.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="], "undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="], @@ -479,7 +485,7 @@ "value-or-promise": ["value-or-promise@1.0.12", "", {}, "sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q=="], - "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], + "which": ["which@4.0.0", "", { "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" } }, "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg=="], "wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], @@ -501,15 +507,37 @@ "@dataplan/pg/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], + "@envelop/extended-validation/@graphql-tools/utils": ["@graphql-tools/utils@10.8.6", "", { "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@whatwg-node/promise-helpers": "^1.0.0", "cross-inspect": "1.0.1", "dset": "^3.1.4", "tslib": "^2.4.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-Alc9Vyg0oOsGhRapfL3xvqh1zV8nKoFUdtLhXX7Ki4nClaIJXckrA86j+uxEuG3ic6j4jlM1nvcWXRn/71AVLQ=="], + "@esbuild-kit/core-utils/esbuild": ["esbuild@0.18.20", "", { "optionalDependencies": { "@esbuild/android-arm": "0.18.20", "@esbuild/android-arm64": "0.18.20", "@esbuild/android-x64": "0.18.20", "@esbuild/darwin-arm64": "0.18.20", "@esbuild/darwin-x64": "0.18.20", "@esbuild/freebsd-arm64": "0.18.20", "@esbuild/freebsd-x64": "0.18.20", "@esbuild/linux-arm": "0.18.20", "@esbuild/linux-arm64": "0.18.20", "@esbuild/linux-ia32": "0.18.20", "@esbuild/linux-loong64": "0.18.20", "@esbuild/linux-mips64el": "0.18.20", "@esbuild/linux-ppc64": "0.18.20", "@esbuild/linux-riscv64": "0.18.20", "@esbuild/linux-s390x": "0.18.20", "@esbuild/linux-x64": "0.18.20", "@esbuild/netbsd-x64": "0.18.20", "@esbuild/openbsd-x64": "0.18.20", "@esbuild/sunos-x64": "0.18.20", "@esbuild/win32-arm64": "0.18.20", "@esbuild/win32-ia32": "0.18.20", "@esbuild/win32-x64": "0.18.20" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA=="], + "@escape.tech/graphql-armor-block-field-suggestions/@envelop/core": ["@envelop/core@5.0.2", "", { "dependencies": { "@envelop/types": "5.0.0", "tslib": "^2.5.0" } }, "sha512-tVL6OrMe6UjqLosiE+EH9uxh2TQC0469GwF4tE014ugRaDDKKVWwFwZe0TBMlcyHKh5MD4ZxktWo/1hqUxIuhw=="], + + "@escape.tech/graphql-armor-cost-limit/@envelop/core": ["@envelop/core@5.0.2", "", { "dependencies": { "@envelop/types": "5.0.0", "tslib": "^2.5.0" } }, "sha512-tVL6OrMe6UjqLosiE+EH9uxh2TQC0469GwF4tE014ugRaDDKKVWwFwZe0TBMlcyHKh5MD4ZxktWo/1hqUxIuhw=="], + + "@escape.tech/graphql-armor-max-aliases/@envelop/core": ["@envelop/core@5.0.2", "", { "dependencies": { "@envelop/types": "5.0.0", "tslib": "^2.5.0" } }, "sha512-tVL6OrMe6UjqLosiE+EH9uxh2TQC0469GwF4tE014ugRaDDKKVWwFwZe0TBMlcyHKh5MD4ZxktWo/1hqUxIuhw=="], + + "@escape.tech/graphql-armor-max-depth/@envelop/core": ["@envelop/core@5.0.2", "", { "dependencies": { "@envelop/types": "5.0.0", "tslib": "^2.5.0" } }, "sha512-tVL6OrMe6UjqLosiE+EH9uxh2TQC0469GwF4tE014ugRaDDKKVWwFwZe0TBMlcyHKh5MD4ZxktWo/1hqUxIuhw=="], + + "@escape.tech/graphql-armor-max-directives/@envelop/core": ["@envelop/core@5.0.2", "", { "dependencies": { "@envelop/types": "5.0.0", "tslib": "^2.5.0" } }, "sha512-tVL6OrMe6UjqLosiE+EH9uxh2TQC0469GwF4tE014ugRaDDKKVWwFwZe0TBMlcyHKh5MD4ZxktWo/1hqUxIuhw=="], + + "@escape.tech/graphql-armor-max-tokens/@envelop/core": ["@envelop/core@5.0.2", "", { "dependencies": { "@envelop/types": "5.0.0", "tslib": "^2.5.0" } }, "sha512-tVL6OrMe6UjqLosiE+EH9uxh2TQC0469GwF4tE014ugRaDDKKVWwFwZe0TBMlcyHKh5MD4ZxktWo/1hqUxIuhw=="], + "@isaacs/cliui/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="], "@isaacs/cliui/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="], "@isaacs/cliui/wrap-ansi": ["wrap-ansi@8.1.0", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="], - "bun-types/@types/node": ["@types/node@20.12.14", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-scnD59RpYD91xngrQQLGkE+6UrHUPzeKZWhhjBSa3HSkwjbQc38+q3RoIVEwxQGRw3M+j5hpNAM+lgV3cVormg=="], + "@types/interpret/@types/node": ["@types/node@22.10.4", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-99l6wv4HEzBQhvaU/UGoeBoCK61SCROQaCCGyQSgX2tEQ3rKkNZ2S7CEWnS/4s1LV+8ODdK21UeyR1fHP2mXug=="], + + "@types/ws/@types/node": ["@types/node@22.10.4", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-99l6wv4HEzBQhvaU/UGoeBoCK61SCROQaCCGyQSgX2tEQ3rKkNZ2S7CEWnS/4s1LV+8ODdK21UeyR1fHP2mXug=="], + + "@whatwg-node/node-fetch/@whatwg-node/disposablestack": ["@whatwg-node/disposablestack@0.0.6", "", { "dependencies": { "@whatwg-node/promise-helpers": "^1.0.0", "tslib": "^2.6.3" } }, "sha512-LOtTn+JgJvX8WfBVJtF08TGrdjuFzGJc4mkP8EdDI8ADbvO7kiexYep1o8dwnt0okb0jYclCDXF13xU7Ge4zSw=="], + + "@whatwg-node/server/@whatwg-node/disposablestack": ["@whatwg-node/disposablestack@0.0.6", "", { "dependencies": { "@whatwg-node/promise-helpers": "^1.0.0", "tslib": "^2.6.3" } }, "sha512-LOtTn+JgJvX8WfBVJtF08TGrdjuFzGJc4mkP8EdDI8ADbvO7kiexYep1o8dwnt0okb0jYclCDXF13xU7Ge4zSw=="], + + "cross-spawn/which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], "grafast/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], @@ -525,12 +553,20 @@ "graphile-export/@types/node": ["@types/node@20.12.14", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-scnD59RpYD91xngrQQLGkE+6UrHUPzeKZWhhjBSa3HSkwjbQc38+q3RoIVEwxQGRw3M+j5hpNAM+lgV3cVormg=="], + "graphql-yoga/@graphql-tools/executor": ["@graphql-tools/executor@1.4.7", "", { "dependencies": { "@graphql-tools/utils": "^10.8.6", "@graphql-typed-document-node/core": "^3.2.0", "@repeaterjs/repeater": "^3.0.4", "@whatwg-node/disposablestack": "^0.0.6", "@whatwg-node/promise-helpers": "^1.0.0", "tslib": "^2.4.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-U0nK9jzJRP9/9Izf1+0Gggd6K6RNRsheFo1gC/VWzfnsr0qjcOSS9qTjY0OTC5iTPt4tQ+W5Zpw/uc7mebI6aA=="], + "http-proxy/eventemitter3": ["eventemitter3@4.0.7", "", {}, "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="], + "pg/pg-protocol": ["pg-protocol@1.8.0", "", {}, "sha512-jvuYlEkL03NRvOoyoRktBK7+qU5kOvlAwvmrH8sr3wbLrOdVWsRxQfz8mMy9sZFsqJ1hEWNfdWKI4SAmoL+j7g=="], + "pg/pg-types": ["pg-types@2.2.0", "", { "dependencies": { "pg-int8": "1.0.1", "postgres-array": "~2.0.0", "postgres-bytea": "~1.0.0", "postgres-date": "~1.0.4", "postgres-interval": "^1.1.0" } }, "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA=="], "postgraphile/@types/node": ["@types/node@20.12.14", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-scnD59RpYD91xngrQQLGkE+6UrHUPzeKZWhhjBSa3HSkwjbQc38+q3RoIVEwxQGRw3M+j5hpNAM+lgV3cVormg=="], + "postgraphile/@types/pg": ["@types/pg@8.11.10", "", { "dependencies": { "@types/node": "*", "pg-protocol": "*", "pg-types": "^4.0.1" } }, "sha512-LczQUW4dbOQzsH2RQ5qoeJ6qJPdrcM/DcMLoqWQkMLMsq83J5lAX3LXjdkWdpscFy67JSOWDnh7Ny/sPFykmkg=="], + + "postgraphile/pg": ["pg@8.13.1", "", { "dependencies": { "pg-connection-string": "^2.7.0", "pg-pool": "^3.7.0", "pg-protocol": "^1.7.0", "pg-types": "^2.1.0", "pgpass": "1.x" }, "optionalDependencies": { "pg-cloudflare": "^1.1.1" }, "peerDependencies": { "pg-native": ">=3.0.1" }, "optionalPeers": ["pg-native"] }, "sha512-OUir1A0rPNZlX//c7ksiu7crsGZTKSOXJPgtNiHGIlC9H0lO+NC6ZDYksSgBYY/thSWhnSRBv8w1lieNNGATNQ=="], + "@dataplan/pg/@types/node/undici-types": ["undici-types@5.26.5", "", {}, "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="], "@esbuild-kit/core-utils/esbuild/@esbuild/android-arm": ["@esbuild/android-arm@0.18.20", "", { "os": "android", "cpu": "arm" }, "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw=="], @@ -577,13 +613,25 @@ "@esbuild-kit/core-utils/esbuild/@esbuild/win32-x64": ["@esbuild/win32-x64@0.18.20", "", { "os": "win32", "cpu": "x64" }, "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ=="], + "@escape.tech/graphql-armor-block-field-suggestions/@envelop/core/@envelop/types": ["@envelop/types@5.0.0", "", { "dependencies": { "tslib": "^2.5.0" } }, "sha512-IPjmgSc4KpQRlO4qbEDnBEixvtb06WDmjKfi/7fkZaryh5HuOmTtixe1EupQI5XfXO8joc3d27uUZ0QdC++euA=="], + + "@escape.tech/graphql-armor-cost-limit/@envelop/core/@envelop/types": ["@envelop/types@5.0.0", "", { "dependencies": { "tslib": "^2.5.0" } }, "sha512-IPjmgSc4KpQRlO4qbEDnBEixvtb06WDmjKfi/7fkZaryh5HuOmTtixe1EupQI5XfXO8joc3d27uUZ0QdC++euA=="], + + "@escape.tech/graphql-armor-max-aliases/@envelop/core/@envelop/types": ["@envelop/types@5.0.0", "", { "dependencies": { "tslib": "^2.5.0" } }, "sha512-IPjmgSc4KpQRlO4qbEDnBEixvtb06WDmjKfi/7fkZaryh5HuOmTtixe1EupQI5XfXO8joc3d27uUZ0QdC++euA=="], + + "@escape.tech/graphql-armor-max-depth/@envelop/core/@envelop/types": ["@envelop/types@5.0.0", "", { "dependencies": { "tslib": "^2.5.0" } }, "sha512-IPjmgSc4KpQRlO4qbEDnBEixvtb06WDmjKfi/7fkZaryh5HuOmTtixe1EupQI5XfXO8joc3d27uUZ0QdC++euA=="], + + "@escape.tech/graphql-armor-max-directives/@envelop/core/@envelop/types": ["@envelop/types@5.0.0", "", { "dependencies": { "tslib": "^2.5.0" } }, "sha512-IPjmgSc4KpQRlO4qbEDnBEixvtb06WDmjKfi/7fkZaryh5HuOmTtixe1EupQI5XfXO8joc3d27uUZ0QdC++euA=="], + + "@escape.tech/graphql-armor-max-tokens/@envelop/core/@envelop/types": ["@envelop/types@5.0.0", "", { "dependencies": { "tslib": "^2.5.0" } }, "sha512-IPjmgSc4KpQRlO4qbEDnBEixvtb06WDmjKfi/7fkZaryh5HuOmTtixe1EupQI5XfXO8joc3d27uUZ0QdC++euA=="], + "@isaacs/cliui/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="], "@isaacs/cliui/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="], "@isaacs/cliui/wrap-ansi/ansi-styles": ["ansi-styles@6.2.1", "", {}, "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug=="], - "bun-types/@types/node/undici-types": ["undici-types@5.26.5", "", {}, "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="], + "cross-spawn/which/isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], "graphile-build-pg/@types/node/undici-types": ["undici-types@5.26.5", "", {}, "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="], @@ -593,6 +641,10 @@ "graphile-export/@types/node/undici-types": ["undici-types@5.26.5", "", {}, "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="], + "graphql-yoga/@graphql-tools/executor/@graphql-tools/utils": ["@graphql-tools/utils@10.8.6", "", { "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@whatwg-node/promise-helpers": "^1.0.0", "cross-inspect": "1.0.1", "dset": "^3.1.4", "tslib": "^2.4.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-Alc9Vyg0oOsGhRapfL3xvqh1zV8nKoFUdtLhXX7Ki4nClaIJXckrA86j+uxEuG3ic6j4jlM1nvcWXRn/71AVLQ=="], + + "graphql-yoga/@graphql-tools/executor/@whatwg-node/disposablestack": ["@whatwg-node/disposablestack@0.0.6", "", { "dependencies": { "@whatwg-node/promise-helpers": "^1.0.0", "tslib": "^2.6.3" } }, "sha512-LOtTn+JgJvX8WfBVJtF08TGrdjuFzGJc4mkP8EdDI8ADbvO7kiexYep1o8dwnt0okb0jYclCDXF13xU7Ge4zSw=="], + "pg/pg-types/postgres-array": ["postgres-array@2.0.0", "", {}, "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA=="], "pg/pg-types/postgres-bytea": ["postgres-bytea@1.0.0", "", {}, "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w=="], @@ -602,5 +654,19 @@ "pg/pg-types/postgres-interval": ["postgres-interval@1.2.0", "", { "dependencies": { "xtend": "^4.0.0" } }, "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ=="], "postgraphile/@types/node/undici-types": ["undici-types@5.26.5", "", {}, "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="], + + "postgraphile/@types/pg/@types/node": ["@types/node@22.10.4", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-99l6wv4HEzBQhvaU/UGoeBoCK61SCROQaCCGyQSgX2tEQ3rKkNZ2S7CEWnS/4s1LV+8ODdK21UeyR1fHP2mXug=="], + + "postgraphile/pg/pg-pool": ["pg-pool@3.7.0", "", { "peerDependencies": { "pg": ">=8.0" } }, "sha512-ZOBQForurqh4zZWjrgSwwAtzJ7QiRX0ovFkZr2klsen3Nm0aoh33Ls0fzfv3imeH/nw/O27cjdz5kzYJfeGp/g=="], + + "postgraphile/pg/pg-types": ["pg-types@2.2.0", "", { "dependencies": { "pg-int8": "1.0.1", "postgres-array": "~2.0.0", "postgres-bytea": "~1.0.0", "postgres-date": "~1.0.4", "postgres-interval": "^1.1.0" } }, "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA=="], + + "postgraphile/pg/pg-types/postgres-array": ["postgres-array@2.0.0", "", {}, "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA=="], + + "postgraphile/pg/pg-types/postgres-bytea": ["postgres-bytea@1.0.0", "", {}, "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w=="], + + "postgraphile/pg/pg-types/postgres-date": ["postgres-date@1.0.7", "", {}, "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q=="], + + "postgraphile/pg/pg-types/postgres-interval": ["postgres-interval@1.2.0", "", { "dependencies": { "xtend": "^4.0.0" } }, "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ=="], } } diff --git a/package.json b/package.json index 7cfadb4..7927492 100644 --- a/package.json +++ b/package.json @@ -22,31 +22,31 @@ }, "devDependencies": { "@biomejs/biome": "^1.9.4", - "@faker-js/faker": "^9.1.0", - "@types/bun": "^1.1.12", - "@types/node": "^22.8.6", - "@types/pg": "^8.11.10", - "drizzle-kit": "^0.30.1", - "husky": "^9.1.6", - "replace-in-file": "^8.2.0", - "typescript": "^5.6.3" + "@faker-js/faker": "^9.6.0", + "@types/bun": "^1.2.8", + "@types/node": "^22.13.14", + "@types/pg": "^8.11.11", + "drizzle-kit": "^0.30.6", + "husky": "^9.1.7", + "replace-in-file": "^8.3.0", + "typescript": "^5.8.2" }, "dependencies": { - "@envelop/generic-auth": "^8.0.1", + "@envelop/generic-auth": "^9.1.3", "@envelop/parser-cache": "^8.1.3", "@envelop/validation-cache": "^8.1.3", "@escape.tech/graphql-armor": "^3.1.2", "@graphile/pg-aggregates": "0.2.0-beta.7", "@graphile/simplify-inflection": "8.0.0-beta.5", "dayjs": "^1.11.13", - "drizzle-orm": "^0.38.2", - "drizzle-seed": "^0.3.0", + "drizzle-orm": "^0.41.0", + "drizzle-seed": "^0.3.1", "graphile-export": "0.0.2-beta.24", - "graphql": "^16.9.0", - "graphql-yoga": "^5.8.0", - "hono": "^4.6.8", - "jose": "^5.9.6", - "pg": "^8.13.1", + "graphql": "^16.10.0", + "graphql-yoga": "^5.13.2", + "hono": "^4.7.5", + "jose": "^6.0.10", + "pg": "^8.14.1", "postgraphile": "5.0.0-beta.37", "postgraphile-plugin-connection-filter": "3.0.0-beta.7" }, From 28180c60ab792258d1c5832505b15c27dfb8c009 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Tue, 15 Apr 2025 14:21:55 -0500 Subject: [PATCH 14/29] chore: format --- src/lib/drizzle/schema/invitation.table.ts | 2 +- .../postgraphile/InvitationRBACPlugin.ts | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lib/drizzle/schema/invitation.table.ts b/src/lib/drizzle/schema/invitation.table.ts index b03815b..f445741 100644 --- a/src/lib/drizzle/schema/invitation.table.ts +++ b/src/lib/drizzle/schema/invitation.table.ts @@ -23,7 +23,7 @@ export const invitations = pgTable( uniqueIndex().on(table.id), uniqueIndex().on(table.email), index().on(table.organizationId), - ] + ], ); /** diff --git a/src/lib/plugins/postgraphile/InvitationRBACPlugin.ts b/src/lib/plugins/postgraphile/InvitationRBACPlugin.ts index c6a4fbd..9012e4b 100644 --- a/src/lib/plugins/postgraphile/InvitationRBACPlugin.ts +++ b/src/lib/plugins/postgraphile/InvitationRBACPlugin.ts @@ -12,7 +12,7 @@ type MutationScope = "create" | "delete"; const validateInvitationPermissions = ( propName: string, - scope: MutationScope + scope: MutationScope, ) => EXPORTABLE( (and, eq, dbSchema, context, sideEffect, propName, scope) => @@ -49,8 +49,8 @@ const validateInvitationPermissions = ( .where( and( eq(members.userId, currentUser.id), - eq(members.organizationId, invitation.organizationId) - ) + eq(members.organizationId, invitation.organizationId), + ), ); if (scope === "create") { @@ -60,7 +60,7 @@ const validateInvitationPermissions = ( (userRole.role !== "owner" && userRole.role !== "admin") ) { throw new Error( - "Only organization owners or admins can send invitations" + "Only organization owners or admins can send invitations", ); } @@ -76,13 +76,13 @@ const validateInvitationPermissions = ( .where( and( eq(invitations.email, invitation.email), - eq(invitations.organizationId, invitation.organizationId) - ) + eq(invitations.organizationId, invitation.organizationId), + ), ); if (existingInvitation) { throw new Error( - "An invitation has already been sent to this email." + "An invitation has already been sent to this email.", ); } @@ -99,13 +99,13 @@ const validateInvitationPermissions = ( .where( and( eq(members.userId, existingUser.id), - eq(members.organizationId, invitation.organizationId) - ) + eq(members.organizationId, invitation.organizationId), + ), ); if (existingMember) { throw new Error( - "User is already a member of the organization." + "User is already a member of the organization.", ); } } @@ -118,16 +118,16 @@ const validateInvitationPermissions = ( // Only allow owner or recipient to delete if (!isOwner || !isRecipient) { throw new Error( - "Only the recipient or owner can delete the invitation" + "Only the recipient or owner can delete the invitation", ); } } - } + }, ); return plan(); }, - [and, eq, dbSchema, context, sideEffect, propName, scope] + [and, eq, dbSchema, context, sideEffect, propName, scope], ); /** From 633eaeb823646e41e10fe5b259208921f6346c2f Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Tue, 15 Apr 2025 21:29:03 -0500 Subject: [PATCH 15/29] refactor: extract auth issuer env vars --- .env.development | 1 + .env.production | 1 + src/lib/config/env.ts | 1 + src/lib/plugins/envelop/useAuth.plugin.ts | 17 ++++++++--------- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.env.development b/.env.development index 8cfc884..2c8af4c 100644 --- a/.env.development +++ b/.env.development @@ -1,2 +1,3 @@ # TODO change once base path changes +AUTH_BASE_URL="https://localhost:8000/api/auth" AUTH_JWKS_URL="https://localhost:8000/api/auth/jwks" diff --git a/.env.production b/.env.production index 5f9585b..e889e82 100644 --- a/.env.production +++ b/.env.production @@ -1,2 +1,3 @@ # TODO change once base path changes +AUTH_BASE_URL="https://identity.omni.dev/api/auth" AUTH_JWKS_URL="https://identity.omni.dev/api/auth/jwks" diff --git a/src/lib/config/env.ts b/src/lib/config/env.ts index 3274d30..6c7c6ea 100644 --- a/src/lib/config/env.ts +++ b/src/lib/config/env.ts @@ -7,6 +7,7 @@ export const { // https://stackoverflow.com/a/68578294 HOST = "0.0.0.0", DATABASE_URL, + AUTH_BASE_URL, AUTH_JWKS_URL, } = process.env; diff --git a/src/lib/plugins/envelop/useAuth.plugin.ts b/src/lib/plugins/envelop/useAuth.plugin.ts index 83a6f49..7f0550e 100644 --- a/src/lib/plugins/envelop/useAuth.plugin.ts +++ b/src/lib/plugins/envelop/useAuth.plugin.ts @@ -1,7 +1,10 @@ import { useGenericAuth } from "@envelop/generic-auth"; import type * as jose from "jose"; -// import { AUTH_JWKS_URL } from "lib/config/env"; +import { + AUTH_BASE_URL, + // AUTH_JWKS_URL +} from "lib/config/env"; import { users } from "lib/drizzle/schema"; import type { ResolveUserFn } from "@envelop/generic-auth"; @@ -23,15 +26,11 @@ const resolveUser: ResolveUserFn = async ( if (!sessionToken) throw new Error("Invalid or missing session token"); // TODO verify best practices for this - const userInfo = await fetch( - // TODO env var - "https://localhost:8000/api/auth/oauth2/userinfo", - { - headers: { - Authorization: `Bearer ${sessionToken}`, - }, + const userInfo = await fetch(`${AUTH_BASE_URL}/oauth2/userinfo`, { + headers: { + Authorization: `Bearer ${sessionToken}`, }, - ); + }); const idToken: jose.JWTPayload = await userInfo.json(); From bbfc81ee3e1c7598a719625a6f01d4649d370811 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Tue, 15 Apr 2025 21:31:12 -0500 Subject: [PATCH 16/29] refactor: change configs file extension --- src/lib/config/app.config.ts | 9 +++++++++ src/lib/config/app.ts | 4 ---- src/lib/config/{env.ts => env.config.ts} | 0 src/lib/db/client.ts | 2 +- src/lib/db/pool.ts | 2 +- src/lib/plugins/envelop/useAuth.plugin.ts | 2 +- src/server.ts | 4 ++-- 7 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 src/lib/config/app.config.ts delete mode 100644 src/lib/config/app.ts rename src/lib/config/{env.ts => env.config.ts} (100%) diff --git a/src/lib/config/app.config.ts b/src/lib/config/app.config.ts new file mode 100644 index 0000000..b7780e1 --- /dev/null +++ b/src/lib/config/app.config.ts @@ -0,0 +1,9 @@ +/** + * Application configuration. + */ +const app = { + name: "Backfeed", + url: "https://backfeed.omni.dev", +}; + +export default app; diff --git a/src/lib/config/app.ts b/src/lib/config/app.ts deleted file mode 100644 index 7ff3f06..0000000 --- a/src/lib/config/app.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const app = { - name: "Backfeed", - url: "https://backfeed.omni.dev", -}; diff --git a/src/lib/config/env.ts b/src/lib/config/env.config.ts similarity index 100% rename from src/lib/config/env.ts rename to src/lib/config/env.config.ts diff --git a/src/lib/db/client.ts b/src/lib/db/client.ts index 5638946..3d22223 100644 --- a/src/lib/db/client.ts +++ b/src/lib/db/client.ts @@ -1,6 +1,6 @@ import { Client } from "pg"; -import { DATABASE_URL } from "lib/config/env"; +import { DATABASE_URL } from "lib/config/env.config"; /** * Postgres database client. diff --git a/src/lib/db/pool.ts b/src/lib/db/pool.ts index dc8fcda..fd669a8 100644 --- a/src/lib/db/pool.ts +++ b/src/lib/db/pool.ts @@ -1,6 +1,6 @@ import { Pool } from "pg"; -import { DATABASE_URL } from "lib/config/env"; +import { DATABASE_URL } from "lib/config/env.config"; /** * Postgres database pool. diff --git a/src/lib/plugins/envelop/useAuth.plugin.ts b/src/lib/plugins/envelop/useAuth.plugin.ts index 7f0550e..a7d955c 100644 --- a/src/lib/plugins/envelop/useAuth.plugin.ts +++ b/src/lib/plugins/envelop/useAuth.plugin.ts @@ -4,7 +4,7 @@ import type * as jose from "jose"; import { AUTH_BASE_URL, // AUTH_JWKS_URL -} from "lib/config/env"; +} from "lib/config/env.config"; import { users } from "lib/drizzle/schema"; import type { ResolveUserFn } from "@envelop/generic-auth"; diff --git a/src/server.ts b/src/server.ts index 42a7f9d..482083c 100644 --- a/src/server.ts +++ b/src/server.ts @@ -7,8 +7,8 @@ import { Hono } from "hono"; import { cors } from "hono/cors"; import { schema } from "generated/graphql/schema.executable"; -import { app as appConfig } from "lib/config/app"; -import { HOST, PORT, isDevEnv, isProdEnv } from "lib/config/env"; +import appConfig from "lib/config/app.config"; +import { HOST, PORT, isDevEnv, isProdEnv } from "lib/config/env.config"; import { createGraphQLContext } from "lib/graphql/context"; import { useAuth } from "lib/plugins/envelop"; From 047e5c2b87a5b1f92843c547261a0ccd5fe98a1a Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Wed, 16 Apr 2025 21:50:14 -0500 Subject: [PATCH 17/29] fix: fix file extensions --- drizzle.config.ts | 2 +- graphile.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drizzle.config.ts b/drizzle.config.ts index 0ffc3d4..5305c19 100644 --- a/drizzle.config.ts +++ b/drizzle.config.ts @@ -1,6 +1,6 @@ import { defineConfig } from "drizzle-kit"; -import { DATABASE_URL } from "./src/lib/config/env"; +import { DATABASE_URL } from "./src/lib/config/env.config"; export default defineConfig({ out: "./src/lib/drizzle/migrations", diff --git a/graphile.config.ts b/graphile.config.ts index 68e527e..5b21dbf 100644 --- a/graphile.config.ts +++ b/graphile.config.ts @@ -4,7 +4,7 @@ import { PostGraphileConnectionFilterPreset } from "postgraphile-plugin-connecti import { makePgService } from "postgraphile/adaptors/pg"; import { PostGraphileAmberPreset } from "postgraphile/presets/amber"; -import { DATABASE_URL, isProdEnv } from "./src/lib/config/env"; +import { DATABASE_URL, isProdEnv } from "./src/lib/config/env.config"; import { CommentRBACPlugin, DownvoteRBACPlugin, From e0c7a1e1be9911fe480d10c0c5a669cf6ba1e4e4 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Wed, 16 Apr 2025 21:50:45 -0500 Subject: [PATCH 18/29] chore(graphile): update exec schema --- src/generated/graphql/schema.executable.ts | 2779 ++++++++++++-------- 1 file changed, 1659 insertions(+), 1120 deletions(-) diff --git a/src/generated/graphql/schema.executable.ts b/src/generated/graphql/schema.executable.ts index 0074870..2cde19e 100644 --- a/src/generated/graphql/schema.executable.ts +++ b/src/generated/graphql/schema.executable.ts @@ -492,6 +492,122 @@ const spec_comment = { executor: executor }; const commentCodec = recordCodec(spec_comment); +const projectIdentifier = sql.identifier("public", "project"); +const spec_project = { + name: "project", + identifier: projectIdentifier, + attributes: Object.assign(Object.create(null), { + id: { + description: undefined, + codec: TYPES.uuid, + notNull: true, + hasDefault: true, + extensions: { + tags: {}, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + name: { + description: undefined, + codec: TYPES.text, + notNull: false, + hasDefault: false, + extensions: { + tags: {}, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + image: { + description: undefined, + codec: TYPES.text, + notNull: false, + hasDefault: false, + extensions: { + tags: {}, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + slug: { + description: undefined, + codec: TYPES.text, + notNull: true, + hasDefault: false, + extensions: { + tags: {}, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + description: { + description: undefined, + codec: TYPES.text, + notNull: false, + hasDefault: false, + extensions: { + tags: {}, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + organization_id: { + description: undefined, + codec: TYPES.uuid, + notNull: true, + hasDefault: false, + extensions: { + tags: {}, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + created_at: { + description: undefined, + codec: TYPES.timestamptz, + notNull: false, + hasDefault: true, + extensions: { + tags: {}, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + updated_at: { + description: undefined, + codec: TYPES.timestamptz, + notNull: false, + hasDefault: true, + extensions: { + tags: {}, + canSelect: true, + canInsert: true, + canUpdate: true + } + } + }), + description: undefined, + extensions: { + oid: "57982", + isTableLike: true, + pg: { + serviceName: "main", + schemaName: "public", + name: "project" + }, + tags: Object.create(null) + }, + executor: executor +}; +const projectCodec = recordCodec(spec_project); const memberIdentifier = sql.identifier("public", "member"); const roleCodec = enumCodec({ name: "role", @@ -831,123 +947,22 @@ const spec_postStatus = { executor: executor }; const postStatusCodec = recordCodec(spec_postStatus); -const projectIdentifier = sql.identifier("public", "project"); -const spec_project = { - name: "project", - identifier: projectIdentifier, - attributes: Object.assign(Object.create(null), { - id: { - description: undefined, - codec: TYPES.uuid, - notNull: true, - hasDefault: true, - extensions: { - tags: {}, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - name: { - description: undefined, - codec: TYPES.text, - notNull: false, - hasDefault: false, - extensions: { - tags: {}, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - image: { - description: undefined, - codec: TYPES.text, - notNull: false, - hasDefault: false, - extensions: { - tags: {}, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - slug: { - description: undefined, - codec: TYPES.text, - notNull: true, - hasDefault: false, - extensions: { - tags: {}, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - description: { - description: undefined, - codec: TYPES.text, - notNull: false, - hasDefault: false, - extensions: { - tags: {}, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - organization_id: { - description: undefined, - codec: TYPES.uuid, - notNull: true, - hasDefault: false, - extensions: { - tags: {}, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - created_at: { - description: undefined, - codec: TYPES.timestamptz, - notNull: false, - hasDefault: true, - extensions: { - tags: {}, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - updated_at: { - description: undefined, - codec: TYPES.timestamptz, - notNull: false, - hasDefault: true, - extensions: { - tags: {}, - canSelect: true, - canInsert: true, - canUpdate: true - } - } - }), +const userIdentifier = sql.identifier("public", "user"); +const tierCodec = enumCodec({ + name: "tier", + identifier: sql.identifier("public", "tier"), + values: ["basic", "team", "enterprise"], description: undefined, extensions: { - oid: "57982", - isTableLike: true, + oid: "58295", pg: { serviceName: "main", schemaName: "public", - name: "project" + name: "tier" }, tags: Object.create(null) - }, - executor: executor -}; -const projectCodec = recordCodec(spec_project); -const userIdentifier = sql.identifier("public", "user"); + } +}); const spec_user = { name: "user", identifier: userIdentifier, @@ -1047,6 +1062,18 @@ const spec_user = { canInsert: true, canUpdate: true } + }, + tier: { + description: undefined, + codec: tierCodec, + notNull: false, + hasDefault: false, + extensions: { + tags: {}, + canSelect: true, + canInsert: true, + canUpdate: true + } } }), description: undefined, @@ -1330,67 +1357,6 @@ const registryConfig_pgResources_project_project = { canDelete: true } }; -const userUniques = [{ - isPrimary: true, - attributes: ["id"], - description: undefined, - extensions: { - tags: Object.create(null) - } -}, { - isPrimary: false, - attributes: ["email"], - description: undefined, - extensions: { - tags: Object.assign(Object.create(null), { - behavior: ["-update", "-delete"] - }) - } -}, { - isPrimary: false, - attributes: ["hidra_id"], - description: undefined, - extensions: { - tags: Object.assign(Object.create(null), { - behavior: ["-update", "-delete"] - }) - } -}, { - isPrimary: false, - attributes: ["username"], - description: undefined, - extensions: { - tags: Object.assign(Object.create(null), { - behavior: ["-update", "-delete"] - }) - } -}]; -const registryConfig_pgResources_user_user = { - executor: executor, - name: "user", - identifier: "main.public.user", - from: userIdentifier, - codec: userCodec, - uniques: userUniques, - isVirtual: false, - description: undefined, - extensions: { - description: undefined, - pg: { - serviceName: "main", - schemaName: "public", - name: "user" - }, - isInsertable: true, - isUpdatable: true, - isDeletable: true, - tags: {}, - canSelect: true, - canInsert: true, - canUpdate: true, - canDelete: true - } -}; const memberUniques = [{ isPrimary: true, attributes: ["id"], @@ -1502,6 +1468,67 @@ const registryConfig_pgResources_post_status_post_status = { canDelete: true } }; +const userUniques = [{ + isPrimary: true, + attributes: ["id"], + description: undefined, + extensions: { + tags: Object.create(null) + } +}, { + isPrimary: false, + attributes: ["email"], + description: undefined, + extensions: { + tags: Object.assign(Object.create(null), { + behavior: ["-update", "-delete"] + }) + } +}, { + isPrimary: false, + attributes: ["hidra_id"], + description: undefined, + extensions: { + tags: Object.assign(Object.create(null), { + behavior: ["-update", "-delete"] + }) + } +}, { + isPrimary: false, + attributes: ["username"], + description: undefined, + extensions: { + tags: Object.assign(Object.create(null), { + behavior: ["-update", "-delete"] + }) + } +}]; +const registryConfig_pgResources_user_user = { + executor: executor, + name: "user", + identifier: "main.public.user", + from: userIdentifier, + codec: userCodec, + uniques: userUniques, + isVirtual: false, + description: undefined, + extensions: { + description: undefined, + pg: { + serviceName: "main", + schemaName: "public", + name: "user" + }, + isInsertable: true, + isUpdatable: true, + isDeletable: true, + tags: {}, + canSelect: true, + canInsert: true, + canUpdate: true, + canDelete: true + } +}; const registryConfig = { pgExecutors: Object.assign(Object.create(null), { main: executor @@ -1515,13 +1542,14 @@ const registryConfig = { text: TYPES.text, organization: organizationCodec, comment: commentCodec, + project: projectCodec, member: memberCodec, role: roleCodec, post: postCodec, postStatus: postStatusCodec, bool: TYPES.boolean, - project: projectCodec, - user: userCodec + user: userCodec, + tier: tierCodec }), pgResources: Object.assign(Object.create(null), { downvote: registryConfig_pgResources_downvote_downvote, @@ -1530,10 +1558,10 @@ const registryConfig = { organization: registryConfig_pgResources_organization_organization, comment: registryConfig_pgResources_comment_comment, project: registryConfig_pgResources_project_project, - user: registryConfig_pgResources_user_user, member: registryConfig_pgResources_member_member, post: registryConfig_pgResources_post_post, - post_status: registryConfig_pgResources_post_status_post_status + post_status: registryConfig_pgResources_post_status_post_status, + user: registryConfig_pgResources_user_user }), pgRelations: Object.assign(Object.create(null), { comment: Object.assign(Object.create(null), { @@ -1985,10 +2013,10 @@ const resource_invitationPgResource = registry.pgResources["invitation"]; const resource_organizationPgResource = registry.pgResources["organization"]; const resource_commentPgResource = registry.pgResources["comment"]; const resource_projectPgResource = registry.pgResources["project"]; -const resource_userPgResource = registry.pgResources["user"]; const resource_memberPgResource = registry.pgResources["member"]; const resource_postPgResource = registry.pgResources["post"]; const resource_post_statusPgResource = registry.pgResources["post_status"]; +const resource_userPgResource = registry.pgResources["user"]; const applyOrderToPlan = ($select, $value, TableOrderByType) => { if (!("evalLength" in $value)) return; const length = $value.evalLength(); @@ -3307,6 +3335,11 @@ const colSpec30 = { attributeName: "email", attribute: spec_user.attributes.email }; +const colSpec31 = { + fieldName: "tier", + attributeName: "tier", + attribute: spec_user.attributes.tier +}; function assertAllowed29(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -3331,18 +3364,6 @@ function assertAllowed30(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function assertAllowed31(fieldArgs, mode) { - const $raw = fieldArgs.getRaw(); - if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); - if (mode === "list" && !false && "evalLength" in $raw) { - const l = $raw.evalLength(); - if (l != null) for (let i = 0; i < l; i++) { - const $entry = $raw.at(i); - if ("evalIsEmpty" in $entry && $entry.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); - } - } - if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); -} const resolve50 = (i, _v, $input) => sql`${i} ${$input.eval() ? sql`IS NULL` : sql`IS NOT NULL`}`; const resolveInputCodec21 = () => TYPES.boolean; const resolveSqlValue14 = () => sql.null; @@ -3393,6 +3414,68 @@ const resolve57 = (i, v) => sql`${i} < ${v}`; const resolve58 = (i, v) => sql`${i} <= ${v}`; const resolve59 = (i, v) => sql`${i} > ${v}`; const resolve60 = (i, v) => sql`${i} >= ${v}`; +function assertAllowed31(fieldArgs, mode) { + const $raw = fieldArgs.getRaw(); + if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); + if (mode === "list" && !false && "evalLength" in $raw) { + const l = $raw.evalLength(); + if (l != null) for (let i = 0; i < l; i++) { + const $entry = $raw.at(i); + if ("evalIsEmpty" in $entry && $entry.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); + } + } + if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); +} +const resolve61 = (i, _v, $input) => sql`${i} ${$input.eval() ? sql`IS NULL` : sql`IS NOT NULL`}`; +const resolveInputCodec24 = () => TYPES.boolean; +const resolveSqlValue15 = () => sql.null; +const resolve62 = (i, v) => sql`${i} = ${v}`; +const forceTextTypesSensitive5 = [TYPES.citext, TYPES.char, TYPES.bpchar]; +function resolveDomains5(c) { + let current = c; + while (current.domainOfCodec) current = current.domainOfCodec; + return current; +} +function resolveInputCodec25(c) { + if (c.arrayOfCodec) { + if (forceTextTypesSensitive5.includes(resolveDomains5(c.arrayOfCodec))) return listOfCodec(TYPES.text, { + extensions: { + listItemNonNull: c.extensions?.listItemNonNull + } + }); + return c; + } else { + if (forceTextTypesSensitive5.includes(resolveDomains5(c))) return TYPES.text; + return c; + } +} +function resolveSqlIdentifier16(identifier, c) { + if (c.arrayOfCodec && forceTextTypesSensitive5.includes(resolveDomains5(c.arrayOfCodec))) return [sql`(${identifier})::text[]`, listOfCodec(TYPES.text, { + extensions: { + listItemNonNull: c.extensions?.listItemNonNull + } + })];else if (forceTextTypesSensitive5.includes(resolveDomains5(c))) return [sql`(${identifier})::text`, TYPES.text];else return [identifier, c]; +} +const resolve63 = (i, v) => sql`${i} <> ${v}`; +const resolve64 = (i, v) => sql`${i} IS DISTINCT FROM ${v}`; +const resolve65 = (i, v) => sql`${i} IS NOT DISTINCT FROM ${v}`; +const resolve66 = (i, v) => sql`${i} = ANY(${v})`; +function resolveInputCodec26(c) { + if (forceTextTypesSensitive5.includes(resolveDomains5(c))) return listOfCodec(TYPES.text, { + extensions: { + listItemNonNull: !0 + } + });else return listOfCodec(c, { + extensions: { + listItemNonNull: !0 + } + }); +} +const resolve67 = (i, v) => sql`${i} <> ALL(${v})`; +const resolve68 = (i, v) => sql`${i} < ${v}`; +const resolve69 = (i, v) => sql`${i} <= ${v}`; +const resolve70 = (i, v) => sql`${i} > ${v}`; +const resolve71 = (i, v) => sql`${i} >= ${v}`; function assertAllowed32(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -3417,27 +3500,27 @@ function assertAllowed33(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -const colSpec31 = { +const colSpec32 = { fieldName: "userId", attributeName: "user_id", attribute: spec_member.attributes.user_id }; -const colSpec32 = { +const colSpec33 = { fieldName: "organizationId", attributeName: "organization_id", attribute: spec_member.attributes.organization_id }; -const colSpec33 = { +const colSpec34 = { fieldName: "createdAt", attributeName: "created_at", attribute: spec_member.attributes.created_at }; -const colSpec34 = { +const colSpec35 = { fieldName: "role", attributeName: "role", attribute: spec_member.attributes.role }; -const colSpec35 = { +const colSpec36 = { fieldName: "rowId", attributeName: "id", attribute: spec_member.attributes.id @@ -3466,42 +3549,42 @@ function assertAllowed35(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -const resolve61 = (i, _v, $input) => sql`${i} ${$input.eval() ? sql`IS NULL` : sql`IS NOT NULL`}`; -const resolveInputCodec24 = () => TYPES.boolean; -const resolveSqlValue15 = () => sql.null; -const resolve62 = (i, v) => sql`${i} = ${v}`; -const forceTextTypesSensitive5 = [TYPES.citext, TYPES.char, TYPES.bpchar]; -function resolveDomains5(c) { +const resolve72 = (i, _v, $input) => sql`${i} ${$input.eval() ? sql`IS NULL` : sql`IS NOT NULL`}`; +const resolveInputCodec27 = () => TYPES.boolean; +const resolveSqlValue16 = () => sql.null; +const resolve73 = (i, v) => sql`${i} = ${v}`; +const forceTextTypesSensitive6 = [TYPES.citext, TYPES.char, TYPES.bpchar]; +function resolveDomains6(c) { let current = c; while (current.domainOfCodec) current = current.domainOfCodec; return current; } -function resolveInputCodec25(c) { +function resolveInputCodec28(c) { if (c.arrayOfCodec) { - if (forceTextTypesSensitive5.includes(resolveDomains5(c.arrayOfCodec))) return listOfCodec(TYPES.text, { + if (forceTextTypesSensitive6.includes(resolveDomains6(c.arrayOfCodec))) return listOfCodec(TYPES.text, { extensions: { listItemNonNull: c.extensions?.listItemNonNull } }); return c; } else { - if (forceTextTypesSensitive5.includes(resolveDomains5(c))) return TYPES.text; + if (forceTextTypesSensitive6.includes(resolveDomains6(c))) return TYPES.text; return c; } } -function resolveSqlIdentifier16(identifier, c) { - if (c.arrayOfCodec && forceTextTypesSensitive5.includes(resolveDomains5(c.arrayOfCodec))) return [sql`(${identifier})::text[]`, listOfCodec(TYPES.text, { +function resolveSqlIdentifier17(identifier, c) { + if (c.arrayOfCodec && forceTextTypesSensitive6.includes(resolveDomains6(c.arrayOfCodec))) return [sql`(${identifier})::text[]`, listOfCodec(TYPES.text, { extensions: { listItemNonNull: c.extensions?.listItemNonNull } - })];else if (forceTextTypesSensitive5.includes(resolveDomains5(c))) return [sql`(${identifier})::text`, TYPES.text];else return [identifier, c]; + })];else if (forceTextTypesSensitive6.includes(resolveDomains6(c))) return [sql`(${identifier})::text`, TYPES.text];else return [identifier, c]; } -const resolve63 = (i, v) => sql`${i} <> ${v}`; -const resolve64 = (i, v) => sql`${i} IS DISTINCT FROM ${v}`; -const resolve65 = (i, v) => sql`${i} IS NOT DISTINCT FROM ${v}`; -const resolve66 = (i, v) => sql`${i} = ANY(${v})`; -function resolveInputCodec26(c) { - if (forceTextTypesSensitive5.includes(resolveDomains5(c))) return listOfCodec(TYPES.text, { +const resolve74 = (i, v) => sql`${i} <> ${v}`; +const resolve75 = (i, v) => sql`${i} IS DISTINCT FROM ${v}`; +const resolve76 = (i, v) => sql`${i} IS NOT DISTINCT FROM ${v}`; +const resolve77 = (i, v) => sql`${i} = ANY(${v})`; +function resolveInputCodec29(c) { + if (forceTextTypesSensitive6.includes(resolveDomains6(c))) return listOfCodec(TYPES.text, { extensions: { listItemNonNull: !0 } @@ -3511,32 +3594,32 @@ function resolveInputCodec26(c) { } }); } -const resolve67 = (i, v) => sql`${i} <> ALL(${v})`; -const resolve68 = (i, v) => sql`${i} < ${v}`; -const resolve69 = (i, v) => sql`${i} <= ${v}`; -const resolve70 = (i, v) => sql`${i} > ${v}`; -const resolve71 = (i, v) => sql`${i} >= ${v}`; -const colSpec36 = { +const resolve78 = (i, v) => sql`${i} <> ALL(${v})`; +const resolve79 = (i, v) => sql`${i} < ${v}`; +const resolve80 = (i, v) => sql`${i} <= ${v}`; +const resolve81 = (i, v) => sql`${i} > ${v}`; +const resolve82 = (i, v) => sql`${i} >= ${v}`; +const colSpec37 = { fieldName: "rowId", attributeName: "id", attribute: spec_organization.attributes.id }; -const colSpec37 = { +const colSpec38 = { fieldName: "name", attributeName: "name", attribute: spec_organization.attributes.name }; -const colSpec38 = { +const colSpec39 = { fieldName: "slug", attributeName: "slug", attribute: spec_organization.attributes.slug }; -const colSpec39 = { +const colSpec40 = { fieldName: "createdAt", attributeName: "created_at", attribute: spec_organization.attributes.created_at }; -const colSpec40 = { +const colSpec41 = { fieldName: "updatedAt", attributeName: "updated_at", attribute: spec_organization.attributes.updated_at @@ -3601,27 +3684,27 @@ function assertAllowed40(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -const colSpec41 = { +const colSpec42 = { fieldName: "rowId", attributeName: "id", attribute: spec_invitation.attributes.id }; -const colSpec42 = { +const colSpec43 = { fieldName: "organizationId", attributeName: "organization_id", attribute: spec_invitation.attributes.organization_id }; -const colSpec43 = { +const colSpec44 = { fieldName: "email", attributeName: "email", attribute: spec_invitation.attributes.email }; -const colSpec44 = { +const colSpec45 = { fieldName: "createdAt", attributeName: "created_at", attribute: spec_invitation.attributes.created_at }; -const colSpec45 = { +const colSpec46 = { fieldName: "updatedAt", attributeName: "updated_at", attribute: spec_invitation.attributes.updated_at @@ -3662,32 +3745,32 @@ function assertAllowed43(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -const colSpec46 = { +const colSpec47 = { fieldName: "rowId", attributeName: "id", attribute: spec_comment.attributes.id }; -const colSpec47 = { +const colSpec48 = { fieldName: "message", attributeName: "message", attribute: spec_comment.attributes.message }; -const colSpec48 = { +const colSpec49 = { fieldName: "postId", attributeName: "post_id", attribute: spec_comment.attributes.post_id }; -const colSpec49 = { +const colSpec50 = { fieldName: "userId", attributeName: "user_id", attribute: spec_comment.attributes.user_id }; -const colSpec50 = { +const colSpec51 = { fieldName: "createdAt", attributeName: "created_at", attribute: spec_comment.attributes.created_at }; -const colSpec51 = { +const colSpec52 = { fieldName: "updatedAt", attributeName: "updated_at", attribute: spec_comment.attributes.updated_at @@ -3728,27 +3811,27 @@ function assertAllowed46(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -const colSpec52 = { +const colSpec53 = { fieldName: "rowId", attributeName: "id", attribute: spec_downvote.attributes.id }; -const colSpec53 = { +const colSpec54 = { fieldName: "postId", attributeName: "post_id", attribute: spec_downvote.attributes.post_id }; -const colSpec54 = { +const colSpec55 = { fieldName: "userId", attributeName: "user_id", attribute: spec_downvote.attributes.user_id }; -const colSpec55 = { +const colSpec56 = { fieldName: "createdAt", attributeName: "created_at", attribute: spec_downvote.attributes.created_at }; -const colSpec56 = { +const colSpec57 = { fieldName: "updatedAt", attributeName: "updated_at", attribute: spec_downvote.attributes.updated_at @@ -3801,42 +3884,42 @@ function assertAllowed50(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -const colSpec57 = { +const colSpec58 = { fieldName: "rowId", attributeName: "id", attribute: spec_postStatus.attributes.id }; -const colSpec58 = { +const colSpec59 = { fieldName: "status", attributeName: "status", attribute: spec_postStatus.attributes.status }; -const colSpec59 = { +const colSpec60 = { fieldName: "description", attributeName: "description", attribute: spec_postStatus.attributes.description }; -const colSpec60 = { +const colSpec61 = { fieldName: "color", attributeName: "color", attribute: spec_postStatus.attributes.color }; -const colSpec61 = { +const colSpec62 = { fieldName: "projectId", attributeName: "project_id", attribute: spec_postStatus.attributes.project_id }; -const colSpec62 = { +const colSpec63 = { fieldName: "isDefault", attributeName: "is_default", attribute: spec_postStatus.attributes.is_default }; -const colSpec63 = { +const colSpec64 = { fieldName: "createdAt", attributeName: "created_at", attribute: spec_postStatus.attributes.created_at }; -const colSpec64 = { +const colSpec65 = { fieldName: "updatedAt", attributeName: "updated_at", attribute: spec_postStatus.attributes.updated_at @@ -3877,42 +3960,42 @@ function assertAllowed53(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -const resolve72 = (i, _v, $input) => sql`${i} ${$input.eval() ? sql`IS NULL` : sql`IS NOT NULL`}`; -const resolveInputCodec27 = () => TYPES.boolean; -const resolveSqlValue16 = () => sql.null; -const resolve73 = (i, v) => sql`${i} = ${v}`; -const forceTextTypesSensitive6 = [TYPES.citext, TYPES.char, TYPES.bpchar]; -function resolveDomains6(c) { +const resolve83 = (i, _v, $input) => sql`${i} ${$input.eval() ? sql`IS NULL` : sql`IS NOT NULL`}`; +const resolveInputCodec30 = () => TYPES.boolean; +const resolveSqlValue17 = () => sql.null; +const resolve84 = (i, v) => sql`${i} = ${v}`; +const forceTextTypesSensitive7 = [TYPES.citext, TYPES.char, TYPES.bpchar]; +function resolveDomains7(c) { let current = c; while (current.domainOfCodec) current = current.domainOfCodec; return current; } -function resolveInputCodec28(c) { +function resolveInputCodec31(c) { if (c.arrayOfCodec) { - if (forceTextTypesSensitive6.includes(resolveDomains6(c.arrayOfCodec))) return listOfCodec(TYPES.text, { + if (forceTextTypesSensitive7.includes(resolveDomains7(c.arrayOfCodec))) return listOfCodec(TYPES.text, { extensions: { listItemNonNull: c.extensions?.listItemNonNull } }); return c; } else { - if (forceTextTypesSensitive6.includes(resolveDomains6(c))) return TYPES.text; + if (forceTextTypesSensitive7.includes(resolveDomains7(c))) return TYPES.text; return c; } } -function resolveSqlIdentifier17(identifier, c) { - if (c.arrayOfCodec && forceTextTypesSensitive6.includes(resolveDomains6(c.arrayOfCodec))) return [sql`(${identifier})::text[]`, listOfCodec(TYPES.text, { +function resolveSqlIdentifier18(identifier, c) { + if (c.arrayOfCodec && forceTextTypesSensitive7.includes(resolveDomains7(c.arrayOfCodec))) return [sql`(${identifier})::text[]`, listOfCodec(TYPES.text, { extensions: { listItemNonNull: c.extensions?.listItemNonNull } - })];else if (forceTextTypesSensitive6.includes(resolveDomains6(c))) return [sql`(${identifier})::text`, TYPES.text];else return [identifier, c]; + })];else if (forceTextTypesSensitive7.includes(resolveDomains7(c))) return [sql`(${identifier})::text`, TYPES.text];else return [identifier, c]; } -const resolve74 = (i, v) => sql`${i} <> ${v}`; -const resolve75 = (i, v) => sql`${i} IS DISTINCT FROM ${v}`; -const resolve76 = (i, v) => sql`${i} IS NOT DISTINCT FROM ${v}`; -const resolve77 = (i, v) => sql`${i} = ANY(${v})`; -function resolveInputCodec29(c) { - if (forceTextTypesSensitive6.includes(resolveDomains6(c))) return listOfCodec(TYPES.text, { +const resolve85 = (i, v) => sql`${i} <> ${v}`; +const resolve86 = (i, v) => sql`${i} IS DISTINCT FROM ${v}`; +const resolve87 = (i, v) => sql`${i} IS NOT DISTINCT FROM ${v}`; +const resolve88 = (i, v) => sql`${i} = ANY(${v})`; +function resolveInputCodec32(c) { + if (forceTextTypesSensitive7.includes(resolveDomains7(c))) return listOfCodec(TYPES.text, { extensions: { listItemNonNull: !0 } @@ -3922,11 +4005,11 @@ function resolveInputCodec29(c) { } }); } -const resolve78 = (i, v) => sql`${i} <> ALL(${v})`; -const resolve79 = (i, v) => sql`${i} < ${v}`; -const resolve80 = (i, v) => sql`${i} <= ${v}`; -const resolve81 = (i, v) => sql`${i} > ${v}`; -const resolve82 = (i, v) => sql`${i} >= ${v}`; +const resolve89 = (i, v) => sql`${i} <> ALL(${v})`; +const resolve90 = (i, v) => sql`${i} < ${v}`; +const resolve91 = (i, v) => sql`${i} <= ${v}`; +const resolve92 = (i, v) => sql`${i} > ${v}`; +const resolve93 = (i, v) => sql`${i} >= ${v}`; function assertAllowed54(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -5015,6 +5098,11 @@ function UserGroupBy_extensions_grafast_applyPlan8($pgSelect) { fragment: sql.fragment`${$pgSelect.alias}.${sql.identifier("last_name")}` }); } +function UserGroupBy_extensions_grafast_applyPlan9($pgSelect) { + $pgSelect.groupBy({ + fragment: sql.fragment`${$pgSelect.alias}.${sql.identifier("tier")}` + }); +} export const UserGroupBy = new GraphQLEnumType({ name: "UserGroupBy", description: "Grouping methods for `User` for usage during aggregation.", @@ -5082,6 +5170,14 @@ export const UserGroupBy = new GraphQLEnumType({ applyPlan: UserGroupBy_extensions_grafast_applyPlan8 } }) + }, + TIER: { + value: "TIER", + extensions: Object.assign(Object.create(null), { + grafast: { + applyPlan: UserGroupBy_extensions_grafast_applyPlan9 + } + }) } }) }); @@ -5331,24 +5427,6 @@ const planWrapper8 = (plan, _, fieldArgs) => { return plan(); }; const oldPlan9 = (_$root, args) => { - const plan = object({ - result: pgUpdateSingle(resource_userPgResource, { - id: args.get(['input', "rowId"]) - }) - }); - args.apply(plan); - return plan; -}; -const planWrapper9 = (plan, _, fieldArgs) => { - const $userId = fieldArgs.getRaw(["input", "rowId"]), - $currentUser = context().get("currentUser"); - sideEffect([$userId, $currentUser], async ([userId, currentUser]) => { - if (!currentUser) throw new Error("Unauthorized"); - if (userId !== currentUser.id) throw new Error("Insufficient permissions"); - }); - return plan(); -}; -const oldPlan10 = (_$root, args) => { const plan = object({ result: pgUpdateSingle(resource_memberPgResource, { id: args.get(['input', "rowId"]) @@ -5357,7 +5435,7 @@ const oldPlan10 = (_$root, args) => { args.apply(plan); return plan; }; -const planWrapper10 = (plan, _, fieldArgs) => { +const planWrapper9 = (plan, _, fieldArgs) => { const $input = fieldArgs.getRaw(["input", "rowId"]), $currentUser = context().get("currentUser"), $db = context().get("db"); @@ -5391,7 +5469,7 @@ const planWrapper10 = (plan, _, fieldArgs) => { }); return plan(); }; -const oldPlan11 = (_$root, args) => { +const oldPlan10 = (_$root, args) => { const plan = object({ result: pgUpdateSingle(resource_postPgResource, { id: args.get(['input', "rowId"]) @@ -5400,7 +5478,7 @@ const oldPlan11 = (_$root, args) => { args.apply(plan); return plan; }; -const planWrapper11 = (plan, _, fieldArgs) => { +const planWrapper10 = (plan, _, fieldArgs) => { const $postId = fieldArgs.getRaw(["input", "rowId"]), $currentUser = context().get("currentUser"), $db = context().get("db"); @@ -5424,7 +5502,7 @@ const planWrapper11 = (plan, _, fieldArgs) => { }); return plan(); }; -const oldPlan12 = (_$root, args) => { +const oldPlan11 = (_$root, args) => { const plan = object({ result: pgUpdateSingle(resource_post_statusPgResource, { id: args.get(['input', "rowId"]) @@ -5433,7 +5511,7 @@ const oldPlan12 = (_$root, args) => { args.apply(plan); return plan; }; -const planWrapper12 = (plan, _, fieldArgs) => { +const planWrapper11 = (plan, _, fieldArgs) => { const $postStatus = fieldArgs.getRaw(["input", "rowId"]), $currentUser = context().get("currentUser"), $db = context().get("db"); @@ -5459,6 +5537,24 @@ const planWrapper12 = (plan, _, fieldArgs) => { }); return plan(); }; +const oldPlan12 = (_$root, args) => { + const plan = object({ + result: pgUpdateSingle(resource_userPgResource, { + id: args.get(['input', "rowId"]) + }) + }); + args.apply(plan); + return plan; +}; +const planWrapper12 = (plan, _, fieldArgs) => { + const $userId = fieldArgs.getRaw(["input", "rowId"]), + $currentUser = context().get("currentUser"); + sideEffect([$userId, $currentUser], async ([userId, currentUser]) => { + if (!currentUser) throw new Error("Unauthorized"); + if (userId !== currentUser.id) throw new Error("Insufficient permissions"); + }); + return plan(); +}; const oldPlan13 = (_$root, args) => { const plan = object({ result: pgDeleteSingle(resource_downvotePgResource, { @@ -5597,24 +5693,6 @@ const planWrapper17 = (plan, _, fieldArgs) => { return plan(); }; const oldPlan18 = (_$root, args) => { - const plan = object({ - result: pgDeleteSingle(resource_userPgResource, { - id: args.get(['input', "rowId"]) - }) - }); - args.apply(plan); - return plan; -}; -const planWrapper18 = (plan, _, fieldArgs) => { - const $userId = fieldArgs.getRaw(["input", "rowId"]), - $currentUser = context().get("currentUser"); - sideEffect([$userId, $currentUser], async ([userId, currentUser]) => { - if (!currentUser) throw new Error("Unauthorized"); - if (userId !== currentUser.id) throw new Error("Insufficient permissions"); - }); - return plan(); -}; -const oldPlan19 = (_$root, args) => { const plan = object({ result: pgDeleteSingle(resource_memberPgResource, { id: args.get(['input', "rowId"]) @@ -5623,7 +5701,7 @@ const oldPlan19 = (_$root, args) => { args.apply(plan); return plan; }; -const planWrapper19 = (plan, _, fieldArgs) => { +const planWrapper18 = (plan, _, fieldArgs) => { const $input = fieldArgs.getRaw(["input", "rowId"]), $currentUser = context().get("currentUser"), $db = context().get("db"); @@ -5657,7 +5735,7 @@ const planWrapper19 = (plan, _, fieldArgs) => { }); return plan(); }; -const oldPlan20 = (_$root, args) => { +const oldPlan19 = (_$root, args) => { const plan = object({ result: pgDeleteSingle(resource_postPgResource, { id: args.get(['input', "rowId"]) @@ -5666,7 +5744,7 @@ const oldPlan20 = (_$root, args) => { args.apply(plan); return plan; }; -const planWrapper20 = (plan, _, fieldArgs) => { +const planWrapper19 = (plan, _, fieldArgs) => { const $postId = fieldArgs.getRaw(["input", "rowId"]), $currentUser = context().get("currentUser"), $db = context().get("db"); @@ -5690,7 +5768,7 @@ const planWrapper20 = (plan, _, fieldArgs) => { }); return plan(); }; -const oldPlan21 = (_$root, args) => { +const oldPlan20 = (_$root, args) => { const plan = object({ result: pgDeleteSingle(resource_post_statusPgResource, { id: args.get(['input', "rowId"]) @@ -5699,7 +5777,7 @@ const oldPlan21 = (_$root, args) => { args.apply(plan); return plan; }; -const planWrapper21 = (plan, _, fieldArgs) => { +const planWrapper20 = (plan, _, fieldArgs) => { const $postStatus = fieldArgs.getRaw(["input", "rowId"]), $currentUser = context().get("currentUser"), $db = context().get("db"); @@ -5725,6 +5803,24 @@ const planWrapper21 = (plan, _, fieldArgs) => { }); return plan(); }; +const oldPlan21 = (_$root, args) => { + const plan = object({ + result: pgDeleteSingle(resource_userPgResource, { + id: args.get(['input', "rowId"]) + }) + }); + args.apply(plan); + return plan; +}; +const planWrapper21 = (plan, _, fieldArgs) => { + const $userId = fieldArgs.getRaw(["input", "rowId"]), + $currentUser = context().get("currentUser"); + sideEffect([$userId, $currentUser], async ([userId, currentUser]) => { + if (!currentUser) throw new Error("Unauthorized"); + if (userId !== currentUser.id) throw new Error("Insufficient permissions"); + }); + return plan(); +}; export const typeDefs = /* GraphQL */`"""The root query type which gives access points into the data universe.""" type Query implements Node { """ @@ -5783,18 +5879,6 @@ type Query implements Node { """Get a single \`Project\`.""" projectBySlugAndOrganizationId(slug: String!, organizationId: UUID!): Project - """Get a single \`User\`.""" - user(rowId: UUID!): User - - """Get a single \`User\`.""" - userByEmail(email: String!): User - - """Get a single \`User\`.""" - userByHidraId(hidraId: UUID!): User - - """Get a single \`User\`.""" - userByUsername(username: String!): User - """Get a single \`Member\`.""" member(rowId: UUID!): Member @@ -5807,6 +5891,18 @@ type Query implements Node { """Get a single \`PostStatus\`.""" postStatus(rowId: UUID!): PostStatus + """Get a single \`User\`.""" + user(rowId: UUID!): User + + """Get a single \`User\`.""" + userByEmail(email: String!): User + + """Get a single \`User\`.""" + userByHidraId(hidraId: UUID!): User + + """Get a single \`User\`.""" + userByUsername(username: String!): User + """Reads and enables pagination through a set of \`Downvote\`.""" downvotes( """Only read the first \`n\` values of the set.""" @@ -6011,8 +6107,8 @@ type Query implements Node { filter: ProjectFilter ): ProjectConnection - """Reads and enables pagination through a set of \`User\`.""" - users( + """Reads and enables pagination through a set of \`Member\`.""" + members( """Only read the first \`n\` values of the set.""" first: Int @@ -6031,22 +6127,22 @@ type Query implements Node { """Read all values in the set after (below) this cursor.""" after: Cursor - """The method to use when ordering \`User\`.""" - orderBy: [UserOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering \`Member\`.""" + orderBy: [MemberOrderBy!] = [PRIMARY_KEY_ASC] """ A condition to be used in determining which values should be returned by the collection. """ - condition: UserCondition + condition: MemberCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: UserFilter - ): UserConnection + filter: MemberFilter + ): MemberConnection - """Reads and enables pagination through a set of \`Member\`.""" - members( + """Reads and enables pagination through a set of \`Post\`.""" + posts( """Only read the first \`n\` values of the set.""" first: Int @@ -6065,22 +6161,22 @@ type Query implements Node { """Read all values in the set after (below) this cursor.""" after: Cursor - """The method to use when ordering \`Member\`.""" - orderBy: [MemberOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering \`Post\`.""" + orderBy: [PostOrderBy!] = [PRIMARY_KEY_ASC] """ A condition to be used in determining which values should be returned by the collection. """ - condition: MemberCondition + condition: PostCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: MemberFilter - ): MemberConnection + filter: PostFilter + ): PostConnection - """Reads and enables pagination through a set of \`Post\`.""" - posts( + """Reads and enables pagination through a set of \`PostStatus\`.""" + postStatuses( """Only read the first \`n\` values of the set.""" first: Int @@ -6099,22 +6195,22 @@ type Query implements Node { """Read all values in the set after (below) this cursor.""" after: Cursor - """The method to use when ordering \`Post\`.""" - orderBy: [PostOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering \`PostStatus\`.""" + orderBy: [PostStatusOrderBy!] = [PRIMARY_KEY_ASC] """ A condition to be used in determining which values should be returned by the collection. """ - condition: PostCondition + condition: PostStatusCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: PostFilter - ): PostConnection + filter: PostStatusFilter + ): PostStatusConnection - """Reads and enables pagination through a set of \`PostStatus\`.""" - postStatuses( + """Reads and enables pagination through a set of \`User\`.""" + users( """Only read the first \`n\` values of the set.""" first: Int @@ -6133,19 +6229,19 @@ type Query implements Node { """Read all values in the set after (below) this cursor.""" after: Cursor - """The method to use when ordering \`PostStatus\`.""" - orderBy: [PostStatusOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering \`User\`.""" + orderBy: [UserOrderBy!] = [PRIMARY_KEY_ASC] """ A condition to be used in determining which values should be returned by the collection. """ - condition: PostStatusCondition + condition: UserCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: PostStatusFilter - ): PostStatusConnection + filter: UserFilter + ): UserConnection } """An object with a globally unique \`ID\`.""" @@ -7223,6 +7319,9 @@ input UserFilter { """Filter by the object’s \`email\` field.""" email: StringFilter + """Filter by the object’s \`tier\` field.""" + tier: TierFilter + """Filter by the object’s \`posts\` relation.""" posts: UserToManyPostFilter @@ -7263,6 +7362,54 @@ input UserFilter { not: UserFilter } +""" +A filter to be used against Tier fields. All fields are combined with a logical ‘and.’ +""" +input TierFilter { + """ + Is null (if \`true\` is specified) or is not null (if \`false\` is specified). + """ + isNull: Boolean + + """Equal to the specified value.""" + equalTo: Tier + + """Not equal to the specified value.""" + notEqualTo: Tier + + """ + Not equal to the specified value, treating null like an ordinary value. + """ + distinctFrom: Tier + + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: Tier + + """Included in the specified list.""" + in: [Tier!] + + """Not included in the specified list.""" + notIn: [Tier!] + + """Less than the specified value.""" + lessThan: Tier + + """Less than or equal to the specified value.""" + lessThanOrEqualTo: Tier + + """Greater than the specified value.""" + greaterThan: Tier + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: Tier +} + +enum Tier { + basic + team + enterprise +} + """ A filter to be used against many \`Post\` object types. All fields are combined with a logical ‘and.’ """ @@ -8124,6 +8271,7 @@ type User { firstName: String lastName: String email: String! + tier: Tier """Reads and enables pagination through a set of \`Post\`.""" posts( @@ -10015,6 +10163,9 @@ type UserDistinctCountAggregates { """Distinct count of email across the matching connection""" email: BigInt + + """Distinct count of tier across the matching connection""" + tier: BigInt } """Grouping methods for \`User\` for usage during aggregation.""" @@ -10027,6 +10178,7 @@ enum UserGroupBy { UPDATED_AT_TRUNCATED_TO_DAY FIRST_NAME LAST_NAME + TIER } """Conditions for \`User\` aggregates.""" @@ -10110,6 +10262,8 @@ enum UserOrderBy { LAST_NAME_DESC EMAIL_ASC EMAIL_DESC + TIER_ASC + TIER_DESC POSTS_COUNT_ASC POSTS_COUNT_DESC POSTS_DISTINCT_COUNT_ROW_ID_ASC @@ -10209,6 +10363,9 @@ input UserCondition { """Checks for equality with the object’s \`email\` field.""" email: String + + """Checks for equality with the object’s \`tier\` field.""" + tier: Tier } """ @@ -10263,14 +10420,6 @@ type Mutation { input: CreateProjectInput! ): CreateProjectPayload - """Creates a single \`User\`.""" - createUser( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateUserInput! - ): CreateUserPayload - """Creates a single \`Member\`.""" createMember( """ @@ -10295,6 +10444,14 @@ type Mutation { input: CreatePostStatusInput! ): CreatePostStatusPayload + """Creates a single \`User\`.""" + createUser( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateUserInput! + ): CreateUserPayload + """Updates a single \`Downvote\` using a unique key and a patch.""" updateDownvote( """ @@ -10343,14 +10500,6 @@ type Mutation { input: UpdateProjectInput! ): UpdateProjectPayload - """Updates a single \`User\` using a unique key and a patch.""" - updateUser( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateUserInput! - ): UpdateUserPayload - """Updates a single \`Member\` using a unique key and a patch.""" updateMember( """ @@ -10375,6 +10524,14 @@ type Mutation { input: UpdatePostStatusInput! ): UpdatePostStatusPayload + """Updates a single \`User\` using a unique key and a patch.""" + updateUser( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateUserInput! + ): UpdateUserPayload + """Deletes a single \`Downvote\` using a unique key.""" deleteDownvote( """ @@ -10423,14 +10580,6 @@ type Mutation { input: DeleteProjectInput! ): DeleteProjectPayload - """Deletes a single \`User\` using a unique key.""" - deleteUser( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteUserInput! - ): DeleteUserPayload - """Deletes a single \`Member\` using a unique key.""" deleteMember( """ @@ -10454,6 +10603,14 @@ type Mutation { """ input: DeletePostStatusInput! ): DeletePostStatusPayload + + """Deletes a single \`User\` using a unique key.""" + deleteUser( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteUserInput! + ): DeleteUserPayload } """The output of our create \`Downvote\` mutation.""" @@ -10724,53 +10881,6 @@ input ProjectInput { updatedAt: Datetime } -"""The output of our create \`User\` mutation.""" -type CreateUserPayload { - """ - The exact same \`clientMutationId\` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The \`User\` that was created by this mutation.""" - user: User - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our \`User\`. May be used by Relay 1.""" - userEdge( - """The method to use when ordering \`User\`.""" - orderBy: [UserOrderBy!]! = [PRIMARY_KEY_ASC] - ): UserEdge -} - -"""All input for the create \`User\` mutation.""" -input CreateUserInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The \`User\` to be created by this mutation.""" - user: UserInput! -} - -"""An input for mutations affecting \`User\`""" -input UserInput { - rowId: UUID - createdAt: Datetime - updatedAt: Datetime - hidraId: UUID! - username: String - firstName: String - lastName: String - email: String! -} - """The output of our create \`Member\` mutation.""" type CreateMemberPayload { """ @@ -10910,6 +11020,54 @@ input PostStatusInput { updatedAt: Datetime } +"""The output of our create \`User\` mutation.""" +type CreateUserPayload { + """ + The exact same \`clientMutationId\` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The \`User\` that was created by this mutation.""" + user: User + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our \`User\`. May be used by Relay 1.""" + userEdge( + """The method to use when ordering \`User\`.""" + orderBy: [UserOrderBy!]! = [PRIMARY_KEY_ASC] + ): UserEdge +} + +"""All input for the create \`User\` mutation.""" +input CreateUserInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The \`User\` to be created by this mutation.""" + user: UserInput! +} + +"""An input for mutations affecting \`User\`""" +input UserInput { + rowId: UUID + createdAt: Datetime + updatedAt: Datetime + hidraId: UUID! + username: String + firstName: String + lastName: String + email: String! + tier: Tier +} + """The output of our update \`Downvote\` mutation.""" type UpdateDownvotePayload { """ @@ -11208,56 +11366,6 @@ input ProjectPatch { updatedAt: Datetime } -"""The output of our update \`User\` mutation.""" -type UpdateUserPayload { - """ - The exact same \`clientMutationId\` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The \`User\` that was updated by this mutation.""" - user: User - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our \`User\`. May be used by Relay 1.""" - userEdge( - """The method to use when ordering \`User\`.""" - orderBy: [UserOrderBy!]! = [PRIMARY_KEY_ASC] - ): UserEdge -} - -"""All input for the \`updateUser\` mutation.""" -input UpdateUserInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - rowId: UUID! - - """ - An object where the defined keys will be set on the \`User\` being updated. - """ - patch: UserPatch! -} - -"""Represents an update to a \`User\`. Fields that are set will be updated.""" -input UserPatch { - rowId: UUID - createdAt: Datetime - updatedAt: Datetime - hidraId: UUID - username: String - firstName: String - lastName: String - email: String -} - """The output of our update \`Member\` mutation.""" type UpdateMemberPayload { """ @@ -11410,6 +11518,57 @@ input PostStatusPatch { updatedAt: Datetime } +"""The output of our update \`User\` mutation.""" +type UpdateUserPayload { + """ + The exact same \`clientMutationId\` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The \`User\` that was updated by this mutation.""" + user: User + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our \`User\`. May be used by Relay 1.""" + userEdge( + """The method to use when ordering \`User\`.""" + orderBy: [UserOrderBy!]! = [PRIMARY_KEY_ASC] + ): UserEdge +} + +"""All input for the \`updateUser\` mutation.""" +input UpdateUserInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + rowId: UUID! + + """ + An object where the defined keys will be set on the \`User\` being updated. + """ + patch: UserPatch! +} + +"""Represents an update to a \`User\`. Fields that are set will be updated.""" +input UserPatch { + rowId: UUID + createdAt: Datetime + updatedAt: Datetime + hidraId: UUID + username: String + firstName: String + lastName: String + email: String + tier: Tier +} + """The output of our delete \`Downvote\` mutation.""" type DeleteDownvotePayload { """ @@ -11608,39 +11767,6 @@ input DeleteProjectInput { rowId: UUID! } -"""The output of our delete \`User\` mutation.""" -type DeleteUserPayload { - """ - The exact same \`clientMutationId\` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The \`User\` that was deleted by this mutation.""" - user: User - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our \`User\`. May be used by Relay 1.""" - userEdge( - """The method to use when ordering \`User\`.""" - orderBy: [UserOrderBy!]! = [PRIMARY_KEY_ASC] - ): UserEdge -} - -"""All input for the \`deleteUser\` mutation.""" -input DeleteUserInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - rowId: UUID! -} - """The output of our delete \`Member\` mutation.""" type DeleteMemberPayload { """ @@ -11738,6 +11864,39 @@ input DeletePostStatusInput { """ clientMutationId: String rowId: UUID! +} + +"""The output of our delete \`User\` mutation.""" +type DeleteUserPayload { + """ + The exact same \`clientMutationId\` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The \`User\` that was deleted by this mutation.""" + user: User + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our \`User\`. May be used by Relay 1.""" + userEdge( + """The method to use when ordering \`User\`.""" + orderBy: [UserOrderBy!]! = [PRIMARY_KEY_ASC] + ): UserEdge +} + +"""All input for the \`deleteUser\` mutation.""" +input DeleteUserInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + rowId: UUID! }`; export const plans = { Query: { @@ -11895,9 +12054,9 @@ export const plans = { organizationId: undefined } }, - user: { + member: { plan(_$root, args) { - return resource_userPgResource.get({ + return resource_memberPgResource.get({ id: args.get("rowId") }); }, @@ -11905,39 +12064,41 @@ export const plans = { rowId: undefined } }, - userByEmail: { + memberByUserIdAndOrganizationId: { plan(_$root, args) { - return resource_userPgResource.get({ - email: args.get("email") + return resource_memberPgResource.get({ + user_id: args.get("userId"), + organization_id: args.get("organizationId") }); }, args: { - email: undefined + userId: undefined, + organizationId: undefined } }, - userByHidraId: { + post: { plan(_$root, args) { - return resource_userPgResource.get({ - hidra_id: args.get("hidraId") + return resource_postPgResource.get({ + id: args.get("rowId") }); }, args: { - hidraId: undefined + rowId: undefined } }, - userByUsername: { + postStatus: { plan(_$root, args) { - return resource_userPgResource.get({ - username: args.get("username") + return resource_post_statusPgResource.get({ + id: args.get("rowId") }); }, args: { - username: undefined + rowId: undefined } }, - member: { + user: { plan(_$root, args) { - return resource_memberPgResource.get({ + return resource_userPgResource.get({ id: args.get("rowId") }); }, @@ -11945,36 +12106,34 @@ export const plans = { rowId: undefined } }, - memberByUserIdAndOrganizationId: { + userByEmail: { plan(_$root, args) { - return resource_memberPgResource.get({ - user_id: args.get("userId"), - organization_id: args.get("organizationId") + return resource_userPgResource.get({ + email: args.get("email") }); }, args: { - userId: undefined, - organizationId: undefined + email: undefined } }, - post: { + userByHidraId: { plan(_$root, args) { - return resource_postPgResource.get({ - id: args.get("rowId") + return resource_userPgResource.get({ + hidra_id: args.get("hidraId") }); }, args: { - rowId: undefined + hidraId: undefined } }, - postStatus: { + userByUsername: { plan(_$root, args) { - return resource_post_statusPgResource.get({ - id: args.get("rowId") + return resource_userPgResource.get({ + username: args.get("username") }); }, args: { - rowId: undefined + username: undefined } }, downvotes: { @@ -12355,9 +12514,9 @@ export const plans = { } } }, - users: { + members: { plan() { - return connection(resource_userPgResource.find()); + return connection(resource_memberPgResource.find()); }, args: { first: { @@ -12395,7 +12554,7 @@ export const plans = { applyPlan(_, $connection, val, info) { const $value = val.getRaw(), $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); return null; } }, @@ -12418,9 +12577,9 @@ export const plans = { } } }, - members: { + posts: { plan() { - return connection(resource_memberPgResource.find()); + return connection(resource_postPgResource.find()); }, args: { first: { @@ -12458,7 +12617,7 @@ export const plans = { applyPlan(_, $connection, val, info) { const $value = val.getRaw(), $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); return null; } }, @@ -12481,9 +12640,9 @@ export const plans = { } } }, - posts: { + postStatuses: { plan() { - return connection(resource_postPgResource.find()); + return connection(resource_post_statusPgResource.find()); }, args: { first: { @@ -12521,7 +12680,7 @@ export const plans = { applyPlan(_, $connection, val, info) { const $value = val.getRaw(), $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); return null; } }, @@ -12544,9 +12703,9 @@ export const plans = { } } }, - postStatuses: { + users: { plan() { - return connection(resource_post_statusPgResource.find()); + return connection(resource_userPgResource.find()); }, args: { first: { @@ -12584,7 +12743,7 @@ export const plans = { applyPlan(_, $connection, val, info) { const $value = val.getRaw(), $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); + applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); return null; } }, @@ -17319,6 +17478,17 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; fieldArgs.apply($col); } }, + tier: { + applyPlan($where, fieldArgs) { + const $raw = fieldArgs.getRaw(); + if ($raw.evalIs(void 0)) return; + if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); + if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); + const $col = new PgConditionStep($where); + $col.extensions.pgFilterAttribute = colSpec31; + fieldArgs.apply($col); + } + }, posts: { applyPlan($where, fieldArgs) { assertAllowed29(fieldArgs, "object"); @@ -17476,198 +17646,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } } }, - UserToManyPostFilter: { - every: { - applyPlan($where, fieldArgs) { - assertAllowed31(fieldArgs, "object"); - if (!$where.extensions.pgFilterRelation) throw new Error("Invalid use of filter, 'pgFilterRelation' expected"); - const { - localAttributes, - remoteAttributes, - tableExpression, - alias - } = $where.extensions.pgFilterRelation, - $subQuery = $where.notPlan().existsPlan({ - tableExpression, - alias - }); - localAttributes.forEach((localAttribute, i) => { - const remoteAttribute = remoteAttributes[i]; - $subQuery.where(sql`${$where.alias}.${sql.identifier(localAttribute)} = ${$subQuery.alias}.${sql.identifier(remoteAttribute)}`); - }); - fieldArgs.apply($subQuery.notPlan().andPlan()); - } - }, - some: { - applyPlan($where, fieldArgs) { - assertAllowed31(fieldArgs, "object"); - if (!$where.extensions.pgFilterRelation) throw new Error("Invalid use of filter, 'pgFilterRelation' expected"); - const { - localAttributes, - remoteAttributes, - tableExpression, - alias - } = $where.extensions.pgFilterRelation, - $subQuery = $where.existsPlan({ - tableExpression, - alias - }); - localAttributes.forEach((localAttribute, i) => { - const remoteAttribute = remoteAttributes[i]; - $subQuery.where(sql`${$where.alias}.${sql.identifier(localAttribute)} = ${$subQuery.alias}.${sql.identifier(remoteAttribute)}`); - }); - fieldArgs.apply($subQuery); - } - }, - none: { - applyPlan($where, fieldArgs) { - assertAllowed31(fieldArgs, "object"); - if (!$where.extensions.pgFilterRelation) throw new Error("Invalid use of filter, 'pgFilterRelation' expected"); - const { - localAttributes, - remoteAttributes, - tableExpression, - alias - } = $where.extensions.pgFilterRelation, - $subQuery = $where.notPlan().existsPlan({ - tableExpression, - alias - }); - localAttributes.forEach((localAttribute, i) => { - const remoteAttribute = remoteAttributes[i]; - $subQuery.where(sql`${$where.alias}.${sql.identifier(localAttribute)} = ${$subQuery.alias}.${sql.identifier(remoteAttribute)}`); - }); - fieldArgs.apply($subQuery); - } - }, - aggregates: { - applyPlan($where, fieldArgs) { - if (!$where.extensions.pgFilterRelation) throw new Error("Invalid use of filter, 'pgFilterRelation' expected"); - const { - localAttributes, - remoteAttributes, - tableExpression, - alias - } = $where.extensions.pgFilterRelation, - $subQuery = new PgAggregateConditionStep($where, { - sql, - tableExpression, - alias - }, pgWhereConditionSpecListToSQL); - localAttributes.forEach((localAttribute, i) => { - const remoteAttribute = remoteAttributes[i]; - $subQuery.where(sql`${$where.alias}.${sql.identifier(localAttribute)} = ${$subQuery.alias}.${sql.identifier(remoteAttribute)}`); - }); - fieldArgs.apply($subQuery); - } - } - }, - PostAggregatesFilter: { - filter: { - applyPlan($subquery, fieldArgs) { - const $condition = new PgConditionStep($subquery, !1, "AND"); - fieldArgs.apply($condition); - } - }, - distinctCount: { - applyPlan($subquery, fieldArgs) { - fieldArgs.apply($subquery.forAggregate(spec)); - } - } - }, - PostDistinctCountAggregateFilter: { - rowId: { - applyPlan($parent, fieldArgs) { - const $col = new PgConditionStep($parent); - $col.extensions.pgFilterAttribute = { - codec: TYPES.bigint, - expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("id")}`, spec_post.attributes.id.codec) - }; - fieldArgs.apply($col); - } - }, - title: { - applyPlan($parent, fieldArgs) { - const $col = new PgConditionStep($parent); - $col.extensions.pgFilterAttribute = { - codec: TYPES.bigint, - expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("title")}`, spec_post.attributes.title.codec) - }; - fieldArgs.apply($col); - } - }, - description: { - applyPlan($parent, fieldArgs) { - const $col = new PgConditionStep($parent); - $col.extensions.pgFilterAttribute = { - codec: TYPES.bigint, - expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("description")}`, spec_post.attributes.description.codec) - }; - fieldArgs.apply($col); - } - }, - projectId: { - applyPlan($parent, fieldArgs) { - const $col = new PgConditionStep($parent); - $col.extensions.pgFilterAttribute = { - codec: TYPES.bigint, - expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("project_id")}`, spec_post.attributes.project_id.codec) - }; - fieldArgs.apply($col); - } - }, - userId: { - applyPlan($parent, fieldArgs) { - const $col = new PgConditionStep($parent); - $col.extensions.pgFilterAttribute = { - codec: TYPES.bigint, - expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("user_id")}`, spec_post.attributes.user_id.codec) - }; - fieldArgs.apply($col); - } - }, - createdAt: { - applyPlan($parent, fieldArgs) { - const $col = new PgConditionStep($parent); - $col.extensions.pgFilterAttribute = { - codec: TYPES.bigint, - expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("created_at")}`, spec_post.attributes.created_at.codec) - }; - fieldArgs.apply($col); - } - }, - updatedAt: { - applyPlan($parent, fieldArgs) { - const $col = new PgConditionStep($parent); - $col.extensions.pgFilterAttribute = { - codec: TYPES.bigint, - expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("updated_at")}`, spec_post.attributes.updated_at.codec) - }; - fieldArgs.apply($col); - } - }, - statusId: { - applyPlan($parent, fieldArgs) { - const $col = new PgConditionStep($parent); - $col.extensions.pgFilterAttribute = { - codec: TYPES.bigint, - expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("status_id")}`, spec_post.attributes.status_id.codec) - }; - fieldArgs.apply($col); - } - }, - statusUpdatedAt: { - applyPlan($parent, fieldArgs) { - const $col = new PgConditionStep($parent); - $col.extensions.pgFilterAttribute = { - codec: TYPES.bigint, - expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("status_updated_at")}`, spec_post.attributes.status_updated_at.codec) - }; - fieldArgs.apply($col); - } - } - }, - BigIntFilter: { + TierFilter: { isNull: { applyPlan($where, fieldArgs) { if (!$where.extensions?.pgFilterAttribute) throw new Error("Planning error: expected 'pgFilterAttribute' to be present on the $where plan's extensions; your extensions to `postgraphile-plugin-connection-filter` does not implement the required interfaces."); @@ -17966,6 +17945,496 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } } }, + UserToManyPostFilter: { + every: { + applyPlan($where, fieldArgs) { + assertAllowed31(fieldArgs, "object"); + if (!$where.extensions.pgFilterRelation) throw new Error("Invalid use of filter, 'pgFilterRelation' expected"); + const { + localAttributes, + remoteAttributes, + tableExpression, + alias + } = $where.extensions.pgFilterRelation, + $subQuery = $where.notPlan().existsPlan({ + tableExpression, + alias + }); + localAttributes.forEach((localAttribute, i) => { + const remoteAttribute = remoteAttributes[i]; + $subQuery.where(sql`${$where.alias}.${sql.identifier(localAttribute)} = ${$subQuery.alias}.${sql.identifier(remoteAttribute)}`); + }); + fieldArgs.apply($subQuery.notPlan().andPlan()); + } + }, + some: { + applyPlan($where, fieldArgs) { + assertAllowed31(fieldArgs, "object"); + if (!$where.extensions.pgFilterRelation) throw new Error("Invalid use of filter, 'pgFilterRelation' expected"); + const { + localAttributes, + remoteAttributes, + tableExpression, + alias + } = $where.extensions.pgFilterRelation, + $subQuery = $where.existsPlan({ + tableExpression, + alias + }); + localAttributes.forEach((localAttribute, i) => { + const remoteAttribute = remoteAttributes[i]; + $subQuery.where(sql`${$where.alias}.${sql.identifier(localAttribute)} = ${$subQuery.alias}.${sql.identifier(remoteAttribute)}`); + }); + fieldArgs.apply($subQuery); + } + }, + none: { + applyPlan($where, fieldArgs) { + assertAllowed31(fieldArgs, "object"); + if (!$where.extensions.pgFilterRelation) throw new Error("Invalid use of filter, 'pgFilterRelation' expected"); + const { + localAttributes, + remoteAttributes, + tableExpression, + alias + } = $where.extensions.pgFilterRelation, + $subQuery = $where.notPlan().existsPlan({ + tableExpression, + alias + }); + localAttributes.forEach((localAttribute, i) => { + const remoteAttribute = remoteAttributes[i]; + $subQuery.where(sql`${$where.alias}.${sql.identifier(localAttribute)} = ${$subQuery.alias}.${sql.identifier(remoteAttribute)}`); + }); + fieldArgs.apply($subQuery); + } + }, + aggregates: { + applyPlan($where, fieldArgs) { + if (!$where.extensions.pgFilterRelation) throw new Error("Invalid use of filter, 'pgFilterRelation' expected"); + const { + localAttributes, + remoteAttributes, + tableExpression, + alias + } = $where.extensions.pgFilterRelation, + $subQuery = new PgAggregateConditionStep($where, { + sql, + tableExpression, + alias + }, pgWhereConditionSpecListToSQL); + localAttributes.forEach((localAttribute, i) => { + const remoteAttribute = remoteAttributes[i]; + $subQuery.where(sql`${$where.alias}.${sql.identifier(localAttribute)} = ${$subQuery.alias}.${sql.identifier(remoteAttribute)}`); + }); + fieldArgs.apply($subQuery); + } + } + }, + PostAggregatesFilter: { + filter: { + applyPlan($subquery, fieldArgs) { + const $condition = new PgConditionStep($subquery, !1, "AND"); + fieldArgs.apply($condition); + } + }, + distinctCount: { + applyPlan($subquery, fieldArgs) { + fieldArgs.apply($subquery.forAggregate(spec)); + } + } + }, + PostDistinctCountAggregateFilter: { + rowId: { + applyPlan($parent, fieldArgs) { + const $col = new PgConditionStep($parent); + $col.extensions.pgFilterAttribute = { + codec: TYPES.bigint, + expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("id")}`, spec_post.attributes.id.codec) + }; + fieldArgs.apply($col); + } + }, + title: { + applyPlan($parent, fieldArgs) { + const $col = new PgConditionStep($parent); + $col.extensions.pgFilterAttribute = { + codec: TYPES.bigint, + expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("title")}`, spec_post.attributes.title.codec) + }; + fieldArgs.apply($col); + } + }, + description: { + applyPlan($parent, fieldArgs) { + const $col = new PgConditionStep($parent); + $col.extensions.pgFilterAttribute = { + codec: TYPES.bigint, + expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("description")}`, spec_post.attributes.description.codec) + }; + fieldArgs.apply($col); + } + }, + projectId: { + applyPlan($parent, fieldArgs) { + const $col = new PgConditionStep($parent); + $col.extensions.pgFilterAttribute = { + codec: TYPES.bigint, + expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("project_id")}`, spec_post.attributes.project_id.codec) + }; + fieldArgs.apply($col); + } + }, + userId: { + applyPlan($parent, fieldArgs) { + const $col = new PgConditionStep($parent); + $col.extensions.pgFilterAttribute = { + codec: TYPES.bigint, + expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("user_id")}`, spec_post.attributes.user_id.codec) + }; + fieldArgs.apply($col); + } + }, + createdAt: { + applyPlan($parent, fieldArgs) { + const $col = new PgConditionStep($parent); + $col.extensions.pgFilterAttribute = { + codec: TYPES.bigint, + expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("created_at")}`, spec_post.attributes.created_at.codec) + }; + fieldArgs.apply($col); + } + }, + updatedAt: { + applyPlan($parent, fieldArgs) { + const $col = new PgConditionStep($parent); + $col.extensions.pgFilterAttribute = { + codec: TYPES.bigint, + expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("updated_at")}`, spec_post.attributes.updated_at.codec) + }; + fieldArgs.apply($col); + } + }, + statusId: { + applyPlan($parent, fieldArgs) { + const $col = new PgConditionStep($parent); + $col.extensions.pgFilterAttribute = { + codec: TYPES.bigint, + expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("status_id")}`, spec_post.attributes.status_id.codec) + }; + fieldArgs.apply($col); + } + }, + statusUpdatedAt: { + applyPlan($parent, fieldArgs) { + const $col = new PgConditionStep($parent); + $col.extensions.pgFilterAttribute = { + codec: TYPES.bigint, + expression: spec.sqlAggregateWrap(sql`${$col.alias}.${sql.identifier("status_updated_at")}`, spec_post.attributes.status_updated_at.codec) + }; + fieldArgs.apply($col); + } + } + }, + BigIntFilter: { + isNull: { + applyPlan($where, fieldArgs) { + if (!$where.extensions?.pgFilterAttribute) throw new Error("Planning error: expected 'pgFilterAttribute' to be present on the $where plan's extensions; your extensions to `postgraphile-plugin-connection-filter` does not implement the required interfaces."); + const $input = fieldArgs.getRaw(); + if ($input.evalIs(void 0)) return; + const { + fieldName: parentFieldName, + attributeName, + attribute, + codec, + expression + } = $where.extensions.pgFilterAttribute, + sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, + sourceCodec = codec ?? attribute.codec, + [sqlIdentifier, identifierCodec] = undefined ? undefined(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + if (false && $input.evalIs(null)) return; + if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); + const $resolvedInput = undefined ? lambda($input, undefined) : $input, + inputCodec = resolveInputCodec24 ? resolveInputCodec24(codec ?? attribute.codec) : codec ?? attribute.codec, + sqlValue = resolveSqlValue15 ? resolveSqlValue15($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + fragment = resolve61(sqlIdentifier, sqlValue, $input, $where, { + fieldName: parentFieldName ?? null, + operatorName: "isNull" + }); + $where.where(fragment); + } + }, + equalTo: { + applyPlan($where, fieldArgs) { + if (!$where.extensions?.pgFilterAttribute) throw new Error("Planning error: expected 'pgFilterAttribute' to be present on the $where plan's extensions; your extensions to `postgraphile-plugin-connection-filter` does not implement the required interfaces."); + const $input = fieldArgs.getRaw(); + if ($input.evalIs(void 0)) return; + const { + fieldName: parentFieldName, + attributeName, + attribute, + codec, + expression + } = $where.extensions.pgFilterAttribute, + sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, + sourceCodec = codec ?? attribute.codec, + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + if (false && $input.evalIs(null)) return; + if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); + const $resolvedInput = undefined ? lambda($input, undefined) : $input, + inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + fragment = resolve62(sqlIdentifier, sqlValue, $input, $where, { + fieldName: parentFieldName ?? null, + operatorName: "equalTo" + }); + $where.where(fragment); + } + }, + notEqualTo: { + applyPlan($where, fieldArgs) { + if (!$where.extensions?.pgFilterAttribute) throw new Error("Planning error: expected 'pgFilterAttribute' to be present on the $where plan's extensions; your extensions to `postgraphile-plugin-connection-filter` does not implement the required interfaces."); + const $input = fieldArgs.getRaw(); + if ($input.evalIs(void 0)) return; + const { + fieldName: parentFieldName, + attributeName, + attribute, + codec, + expression + } = $where.extensions.pgFilterAttribute, + sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, + sourceCodec = codec ?? attribute.codec, + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + if (false && $input.evalIs(null)) return; + if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); + const $resolvedInput = undefined ? lambda($input, undefined) : $input, + inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + fragment = resolve63(sqlIdentifier, sqlValue, $input, $where, { + fieldName: parentFieldName ?? null, + operatorName: "notEqualTo" + }); + $where.where(fragment); + } + }, + distinctFrom: { + applyPlan($where, fieldArgs) { + if (!$where.extensions?.pgFilterAttribute) throw new Error("Planning error: expected 'pgFilterAttribute' to be present on the $where plan's extensions; your extensions to `postgraphile-plugin-connection-filter` does not implement the required interfaces."); + const $input = fieldArgs.getRaw(); + if ($input.evalIs(void 0)) return; + const { + fieldName: parentFieldName, + attributeName, + attribute, + codec, + expression + } = $where.extensions.pgFilterAttribute, + sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, + sourceCodec = codec ?? attribute.codec, + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + if (false && $input.evalIs(null)) return; + if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); + const $resolvedInput = undefined ? lambda($input, undefined) : $input, + inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + fragment = resolve64(sqlIdentifier, sqlValue, $input, $where, { + fieldName: parentFieldName ?? null, + operatorName: "distinctFrom" + }); + $where.where(fragment); + } + }, + notDistinctFrom: { + applyPlan($where, fieldArgs) { + if (!$where.extensions?.pgFilterAttribute) throw new Error("Planning error: expected 'pgFilterAttribute' to be present on the $where plan's extensions; your extensions to `postgraphile-plugin-connection-filter` does not implement the required interfaces."); + const $input = fieldArgs.getRaw(); + if ($input.evalIs(void 0)) return; + const { + fieldName: parentFieldName, + attributeName, + attribute, + codec, + expression + } = $where.extensions.pgFilterAttribute, + sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, + sourceCodec = codec ?? attribute.codec, + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + if (false && $input.evalIs(null)) return; + if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); + const $resolvedInput = undefined ? lambda($input, undefined) : $input, + inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + fragment = resolve65(sqlIdentifier, sqlValue, $input, $where, { + fieldName: parentFieldName ?? null, + operatorName: "notDistinctFrom" + }); + $where.where(fragment); + } + }, + in: { + applyPlan($where, fieldArgs) { + if (!$where.extensions?.pgFilterAttribute) throw new Error("Planning error: expected 'pgFilterAttribute' to be present on the $where plan's extensions; your extensions to `postgraphile-plugin-connection-filter` does not implement the required interfaces."); + const $input = fieldArgs.getRaw(); + if ($input.evalIs(void 0)) return; + const { + fieldName: parentFieldName, + attributeName, + attribute, + codec, + expression + } = $where.extensions.pgFilterAttribute, + sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, + sourceCodec = codec ?? attribute.codec, + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + if (false && $input.evalIs(null)) return; + if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); + const $resolvedInput = undefined ? lambda($input, undefined) : $input, + inputCodec = resolveInputCodec26 ? resolveInputCodec26(codec ?? attribute.codec) : codec ?? attribute.codec, + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + fragment = resolve66(sqlIdentifier, sqlValue, $input, $where, { + fieldName: parentFieldName ?? null, + operatorName: "in" + }); + $where.where(fragment); + } + }, + notIn: { + applyPlan($where, fieldArgs) { + if (!$where.extensions?.pgFilterAttribute) throw new Error("Planning error: expected 'pgFilterAttribute' to be present on the $where plan's extensions; your extensions to `postgraphile-plugin-connection-filter` does not implement the required interfaces."); + const $input = fieldArgs.getRaw(); + if ($input.evalIs(void 0)) return; + const { + fieldName: parentFieldName, + attributeName, + attribute, + codec, + expression + } = $where.extensions.pgFilterAttribute, + sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, + sourceCodec = codec ?? attribute.codec, + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + if (false && $input.evalIs(null)) return; + if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); + const $resolvedInput = undefined ? lambda($input, undefined) : $input, + inputCodec = resolveInputCodec26 ? resolveInputCodec26(codec ?? attribute.codec) : codec ?? attribute.codec, + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + fragment = resolve67(sqlIdentifier, sqlValue, $input, $where, { + fieldName: parentFieldName ?? null, + operatorName: "notIn" + }); + $where.where(fragment); + } + }, + lessThan: { + applyPlan($where, fieldArgs) { + if (!$where.extensions?.pgFilterAttribute) throw new Error("Planning error: expected 'pgFilterAttribute' to be present on the $where plan's extensions; your extensions to `postgraphile-plugin-connection-filter` does not implement the required interfaces."); + const $input = fieldArgs.getRaw(); + if ($input.evalIs(void 0)) return; + const { + fieldName: parentFieldName, + attributeName, + attribute, + codec, + expression + } = $where.extensions.pgFilterAttribute, + sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, + sourceCodec = codec ?? attribute.codec, + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + if (false && $input.evalIs(null)) return; + if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); + const $resolvedInput = undefined ? lambda($input, undefined) : $input, + inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + fragment = resolve68(sqlIdentifier, sqlValue, $input, $where, { + fieldName: parentFieldName ?? null, + operatorName: "lessThan" + }); + $where.where(fragment); + } + }, + lessThanOrEqualTo: { + applyPlan($where, fieldArgs) { + if (!$where.extensions?.pgFilterAttribute) throw new Error("Planning error: expected 'pgFilterAttribute' to be present on the $where plan's extensions; your extensions to `postgraphile-plugin-connection-filter` does not implement the required interfaces."); + const $input = fieldArgs.getRaw(); + if ($input.evalIs(void 0)) return; + const { + fieldName: parentFieldName, + attributeName, + attribute, + codec, + expression + } = $where.extensions.pgFilterAttribute, + sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, + sourceCodec = codec ?? attribute.codec, + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + if (false && $input.evalIs(null)) return; + if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); + const $resolvedInput = undefined ? lambda($input, undefined) : $input, + inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + fragment = resolve69(sqlIdentifier, sqlValue, $input, $where, { + fieldName: parentFieldName ?? null, + operatorName: "lessThanOrEqualTo" + }); + $where.where(fragment); + } + }, + greaterThan: { + applyPlan($where, fieldArgs) { + if (!$where.extensions?.pgFilterAttribute) throw new Error("Planning error: expected 'pgFilterAttribute' to be present on the $where plan's extensions; your extensions to `postgraphile-plugin-connection-filter` does not implement the required interfaces."); + const $input = fieldArgs.getRaw(); + if ($input.evalIs(void 0)) return; + const { + fieldName: parentFieldName, + attributeName, + attribute, + codec, + expression + } = $where.extensions.pgFilterAttribute, + sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, + sourceCodec = codec ?? attribute.codec, + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + if (false && $input.evalIs(null)) return; + if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); + const $resolvedInput = undefined ? lambda($input, undefined) : $input, + inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + fragment = resolve70(sqlIdentifier, sqlValue, $input, $where, { + fieldName: parentFieldName ?? null, + operatorName: "greaterThan" + }); + $where.where(fragment); + } + }, + greaterThanOrEqualTo: { + applyPlan($where, fieldArgs) { + if (!$where.extensions?.pgFilterAttribute) throw new Error("Planning error: expected 'pgFilterAttribute' to be present on the $where plan's extensions; your extensions to `postgraphile-plugin-connection-filter` does not implement the required interfaces."); + const $input = fieldArgs.getRaw(); + if ($input.evalIs(void 0)) return; + const { + fieldName: parentFieldName, + attributeName, + attribute, + codec, + expression + } = $where.extensions.pgFilterAttribute, + sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, + sourceCodec = codec ?? attribute.codec, + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + if (false && $input.evalIs(null)) return; + if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); + const $resolvedInput = undefined ? lambda($input, undefined) : $input, + inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + fragment = resolve71(sqlIdentifier, sqlValue, $input, $where, { + fieldName: parentFieldName ?? null, + operatorName: "greaterThanOrEqualTo" + }); + $where.where(fragment); + } + } + }, UserToManyUpvoteFilter: { every: { applyPlan($where, fieldArgs) { @@ -18211,7 +18680,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec31; + $col.extensions.pgFilterAttribute = colSpec32; fieldArgs.apply($col); } }, @@ -18222,7 +18691,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec32; + $col.extensions.pgFilterAttribute = colSpec33; fieldArgs.apply($col); } }, @@ -18233,7 +18702,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec33; + $col.extensions.pgFilterAttribute = colSpec34; fieldArgs.apply($col); } }, @@ -18244,7 +18713,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec34; + $col.extensions.pgFilterAttribute = colSpec35; fieldArgs.apply($col); } }, @@ -18255,7 +18724,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec35; + $col.extensions.pgFilterAttribute = colSpec36; fieldArgs.apply($col); } }, @@ -18328,9 +18797,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec24 ? resolveInputCodec24(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = resolveSqlValue15 ? resolveSqlValue15($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve61(sqlIdentifier, sqlValue, $input, $where, { + inputCodec = resolveInputCodec27 ? resolveInputCodec27(codec ?? attribute.codec) : codec ?? attribute.codec, + sqlValue = resolveSqlValue16 ? resolveSqlValue16($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + fragment = resolve72(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "isNull" }); @@ -18351,13 +18820,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve62(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve73(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "equalTo" }); @@ -18378,13 +18847,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve63(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve74(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEqualTo" }); @@ -18405,13 +18874,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve64(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve75(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "distinctFrom" }); @@ -18432,13 +18901,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve65(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve76(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notDistinctFrom" }); @@ -18459,13 +18928,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec26 ? resolveInputCodec26(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec29 ? resolveInputCodec29(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve66(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve77(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "in" }); @@ -18486,13 +18955,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec26 ? resolveInputCodec26(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec29 ? resolveInputCodec29(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve67(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve78(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIn" }); @@ -18513,13 +18982,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve68(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve79(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThan" }); @@ -18540,13 +19009,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve69(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve80(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThanOrEqualTo" }); @@ -18567,13 +19036,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve70(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve81(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThan" }); @@ -18594,13 +19063,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve71(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve82(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThanOrEqualTo" }); @@ -18616,7 +19085,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec36; + $col.extensions.pgFilterAttribute = colSpec37; fieldArgs.apply($col); } }, @@ -18627,7 +19096,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec37; + $col.extensions.pgFilterAttribute = colSpec38; fieldArgs.apply($col); } }, @@ -18638,7 +19107,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec38; + $col.extensions.pgFilterAttribute = colSpec39; fieldArgs.apply($col); } }, @@ -18649,7 +19118,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec39; + $col.extensions.pgFilterAttribute = colSpec40; fieldArgs.apply($col); } }, @@ -18660,7 +19129,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec40; + $col.extensions.pgFilterAttribute = colSpec41; fieldArgs.apply($col); } }, @@ -19193,7 +19662,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec41; + $col.extensions.pgFilterAttribute = colSpec42; fieldArgs.apply($col); } }, @@ -19204,7 +19673,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec42; + $col.extensions.pgFilterAttribute = colSpec43; fieldArgs.apply($col); } }, @@ -19215,7 +19684,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec43; + $col.extensions.pgFilterAttribute = colSpec44; fieldArgs.apply($col); } }, @@ -19226,7 +19695,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec44; + $col.extensions.pgFilterAttribute = colSpec45; fieldArgs.apply($col); } }, @@ -19237,7 +19706,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec45; + $col.extensions.pgFilterAttribute = colSpec46; fieldArgs.apply($col); } }, @@ -19436,7 +19905,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec46; + $col.extensions.pgFilterAttribute = colSpec47; fieldArgs.apply($col); } }, @@ -19447,7 +19916,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec47; + $col.extensions.pgFilterAttribute = colSpec48; fieldArgs.apply($col); } }, @@ -19458,7 +19927,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec48; + $col.extensions.pgFilterAttribute = colSpec49; fieldArgs.apply($col); } }, @@ -19469,7 +19938,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec49; + $col.extensions.pgFilterAttribute = colSpec50; fieldArgs.apply($col); } }, @@ -19480,7 +19949,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec50; + $col.extensions.pgFilterAttribute = colSpec51; fieldArgs.apply($col); } }, @@ -19491,7 +19960,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec51; + $col.extensions.pgFilterAttribute = colSpec52; fieldArgs.apply($col); } }, @@ -19714,7 +20183,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec52; + $col.extensions.pgFilterAttribute = colSpec53; fieldArgs.apply($col); } }, @@ -19725,7 +20194,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec53; + $col.extensions.pgFilterAttribute = colSpec54; fieldArgs.apply($col); } }, @@ -19736,7 +20205,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec54; + $col.extensions.pgFilterAttribute = colSpec55; fieldArgs.apply($col); } }, @@ -19747,7 +20216,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec55; + $col.extensions.pgFilterAttribute = colSpec56; fieldArgs.apply($col); } }, @@ -19758,7 +20227,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec56; + $col.extensions.pgFilterAttribute = colSpec57; fieldArgs.apply($col); } }, @@ -20057,7 +20526,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec57; + $col.extensions.pgFilterAttribute = colSpec58; fieldArgs.apply($col); } }, @@ -20068,7 +20537,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec58; + $col.extensions.pgFilterAttribute = colSpec59; fieldArgs.apply($col); } }, @@ -20079,7 +20548,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec59; + $col.extensions.pgFilterAttribute = colSpec60; fieldArgs.apply($col); } }, @@ -20090,7 +20559,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec60; + $col.extensions.pgFilterAttribute = colSpec61; fieldArgs.apply($col); } }, @@ -20101,7 +20570,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec61; + $col.extensions.pgFilterAttribute = colSpec62; fieldArgs.apply($col); } }, @@ -20112,7 +20581,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec62; + $col.extensions.pgFilterAttribute = colSpec63; fieldArgs.apply($col); } }, @@ -20123,7 +20592,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec63; + $col.extensions.pgFilterAttribute = colSpec64; fieldArgs.apply($col); } }, @@ -20134,7 +20603,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $col = new PgConditionStep($where); - $col.extensions.pgFilterAttribute = colSpec64; + $col.extensions.pgFilterAttribute = colSpec65; fieldArgs.apply($col); } }, @@ -20220,9 +20689,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec27 ? resolveInputCodec27(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = resolveSqlValue16 ? resolveSqlValue16($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve72(sqlIdentifier, sqlValue, $input, $where, { + inputCodec = resolveInputCodec30 ? resolveInputCodec30(codec ?? attribute.codec) : codec ?? attribute.codec, + sqlValue = resolveSqlValue17 ? resolveSqlValue17($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + fragment = resolve83(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "isNull" }); @@ -20243,13 +20712,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier18 ? resolveSqlIdentifier18(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec31 ? resolveInputCodec31(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve73(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve84(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "equalTo" }); @@ -20270,13 +20739,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier18 ? resolveSqlIdentifier18(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec31 ? resolveInputCodec31(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve74(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve85(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEqualTo" }); @@ -20297,13 +20766,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier18 ? resolveSqlIdentifier18(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec31 ? resolveInputCodec31(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve75(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve86(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "distinctFrom" }); @@ -20324,13 +20793,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier18 ? resolveSqlIdentifier18(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec31 ? resolveInputCodec31(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve76(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve87(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notDistinctFrom" }); @@ -20351,13 +20820,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier18 ? resolveSqlIdentifier18(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec29 ? resolveInputCodec29(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec32 ? resolveInputCodec32(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve77(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve88(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "in" }); @@ -20378,13 +20847,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier18 ? resolveSqlIdentifier18(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec29 ? resolveInputCodec29(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec32 ? resolveInputCodec32(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve78(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve89(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIn" }); @@ -20405,13 +20874,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier18 ? resolveSqlIdentifier18(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec31 ? resolveInputCodec31(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve79(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve90(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThan" }); @@ -20432,13 +20901,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier18 ? resolveSqlIdentifier18(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec31 ? resolveInputCodec31(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve80(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve91(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThanOrEqualTo" }); @@ -20459,13 +20928,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier18 ? resolveSqlIdentifier18(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec31 ? resolveInputCodec31(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve81(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve92(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThan" }); @@ -20486,13 +20955,13 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = resolveSqlIdentifier18 ? resolveSqlIdentifier18(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = undefined ? lambda($input, undefined) : $input, - inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, + inputCodec = resolveInputCodec31 ? resolveInputCodec31(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), - fragment = resolve82(sqlIdentifier, sqlValue, $input, $where, { + fragment = resolve93(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThanOrEqualTo" }); @@ -20866,6 +21335,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; email($record) { return $record.get("email"); }, + tier($record) { + return $record.get("tier"); + }, posts: { plan($record) { const $records = resource_postPgResource.find({ @@ -28703,6 +29175,11 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; const sqlAttribute = sql.fragment`${$pgSelectSingle.getClassStep().alias}.${sql.identifier("email")}`, sqlAggregate = spec.sqlAggregateWrap(sqlAttribute, TYPES.text); return $pgSelectSingle.select(sqlAggregate, TYPES.bigint); + }, + tier($pgSelectSingle) { + const sqlAttribute = sql.fragment`${$pgSelectSingle.getClassStep().alias}.${sql.identifier("tier")}`, + sqlAggregate = spec.sqlAggregateWrap(sqlAttribute, tierCodec); + return $pgSelectSingle.select(sqlAggregate, TYPES.bigint); } }, UserGroupBy: { @@ -28729,6 +29206,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, LAST_NAME: { applyPlan: UserGroupBy_extensions_grafast_applyPlan8 + }, + TIER: { + applyPlan: UserGroupBy_extensions_grafast_applyPlan9 } }, UserHavingInput: { @@ -29179,6 +29659,32 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (true) plan.setOrderIsUnique(); } }, + TIER_ASC: { + applyPlan(plan) { + if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); + plan.orderBy({ + attribute: "tier", + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) + }); + if (false) plan.setOrderIsUnique(); + } + }, + TIER_DESC: { + applyPlan(plan) { + if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); + plan.orderBy({ + attribute: "tier", + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) + }); + if (false) plan.setOrderIsUnique(); + } + }, POSTS_COUNT_ASC: { applyPlan($select) { const foreignTableAlias = $select.alias, @@ -30852,6 +31358,25 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true + }, + tier: { + applyPlan($condition, val) { + if (val.getRaw().evalIs(null)) $condition.where({ + type: "attribute", + attribute: "tier", + callback(expression) { + return sql`${expression} is null`; + } + });else $condition.where({ + type: "attribute", + attribute: "tier", + callback(expression) { + return sql`${expression} = ${$condition.placeholder(val.get(), spec_user.attributes.tier.codec)}`; + } + }); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true } }, Mutation: { @@ -30967,23 +31492,6 @@ ${String(oldPlan)}`); } } }, - createUser: { - plan(_, args) { - const plan = object({ - result: pgInsertSingle(resource_userPgResource, Object.create(null)) - }); - args.apply(plan); - return plan; - }, - args: { - input: { - autoApplyAfterParentPlan: true, - applyPlan(_, $object) { - return $object; - } - } - } - }, createMember: { plan(...planParams) { const smartPlan = (...overrideParams) => { @@ -31053,6 +31561,23 @@ ${String(oldPlan3)}`); } } }, + createUser: { + plan(_, args) { + const plan = object({ + result: pgInsertSingle(resource_userPgResource, Object.create(null)) + }); + args.apply(plan); + return plan; + }, + args: { + input: { + autoApplyAfterParentPlan: true, + applyPlan(_, $object) { + return $object; + } + } + } + }, updateDownvote: { plan(...planParams) { const smartPlan = (...overrideParams) => { @@ -31196,12 +31721,12 @@ ${String(oldPlan8)}`); } } }, - updateUser: { + updateMember: { plan(...planParams) { const smartPlan = (...overrideParams) => { const $prev = oldPlan9(...overrideParams.concat(planParams.slice(overrideParams.length))); if (!($prev instanceof ExecutableStep)) { - console.error(`Wrapped a plan function at ${"Mutation"}.${"updateUser"}, but that function did not return a step! + console.error(`Wrapped a plan function at ${"Mutation"}.${"updateMember"}, but that function did not return a step! ${String(oldPlan9)}`); throw new Error("Wrapped a plan function, but that function did not return a step!"); } @@ -31221,12 +31746,12 @@ ${String(oldPlan9)}`); } } }, - updateMember: { + updatePost: { plan(...planParams) { const smartPlan = (...overrideParams) => { const $prev = oldPlan10(...overrideParams.concat(planParams.slice(overrideParams.length))); if (!($prev instanceof ExecutableStep)) { - console.error(`Wrapped a plan function at ${"Mutation"}.${"updateMember"}, but that function did not return a step! + console.error(`Wrapped a plan function at ${"Mutation"}.${"updatePost"}, but that function did not return a step! ${String(oldPlan10)}`); throw new Error("Wrapped a plan function, but that function did not return a step!"); } @@ -31246,12 +31771,12 @@ ${String(oldPlan10)}`); } } }, - updatePost: { + updatePostStatus: { plan(...planParams) { const smartPlan = (...overrideParams) => { const $prev = oldPlan11(...overrideParams.concat(planParams.slice(overrideParams.length))); if (!($prev instanceof ExecutableStep)) { - console.error(`Wrapped a plan function at ${"Mutation"}.${"updatePost"}, but that function did not return a step! + console.error(`Wrapped a plan function at ${"Mutation"}.${"updatePostStatus"}, but that function did not return a step! ${String(oldPlan11)}`); throw new Error("Wrapped a plan function, but that function did not return a step!"); } @@ -31271,12 +31796,12 @@ ${String(oldPlan11)}`); } } }, - updatePostStatus: { + updateUser: { plan(...planParams) { const smartPlan = (...overrideParams) => { const $prev = oldPlan12(...overrideParams.concat(planParams.slice(overrideParams.length))); if (!($prev instanceof ExecutableStep)) { - console.error(`Wrapped a plan function at ${"Mutation"}.${"updatePostStatus"}, but that function did not return a step! + console.error(`Wrapped a plan function at ${"Mutation"}.${"updateUser"}, but that function did not return a step! ${String(oldPlan12)}`); throw new Error("Wrapped a plan function, but that function did not return a step!"); } @@ -31439,12 +31964,12 @@ ${String(oldPlan17)}`); } } }, - deleteUser: { + deleteMember: { plan(...planParams) { const smartPlan = (...overrideParams) => { const $prev = oldPlan18(...overrideParams.concat(planParams.slice(overrideParams.length))); if (!($prev instanceof ExecutableStep)) { - console.error(`Wrapped a plan function at ${"Mutation"}.${"deleteUser"}, but that function did not return a step! + console.error(`Wrapped a plan function at ${"Mutation"}.${"deleteMember"}, but that function did not return a step! ${String(oldPlan18)}`); throw new Error("Wrapped a plan function, but that function did not return a step!"); } @@ -31464,12 +31989,12 @@ ${String(oldPlan18)}`); } } }, - deleteMember: { + deletePost: { plan(...planParams) { const smartPlan = (...overrideParams) => { const $prev = oldPlan19(...overrideParams.concat(planParams.slice(overrideParams.length))); if (!($prev instanceof ExecutableStep)) { - console.error(`Wrapped a plan function at ${"Mutation"}.${"deleteMember"}, but that function did not return a step! + console.error(`Wrapped a plan function at ${"Mutation"}.${"deletePost"}, but that function did not return a step! ${String(oldPlan19)}`); throw new Error("Wrapped a plan function, but that function did not return a step!"); } @@ -31489,12 +32014,12 @@ ${String(oldPlan19)}`); } } }, - deletePost: { + deletePostStatus: { plan(...planParams) { const smartPlan = (...overrideParams) => { const $prev = oldPlan20(...overrideParams.concat(planParams.slice(overrideParams.length))); if (!($prev instanceof ExecutableStep)) { - console.error(`Wrapped a plan function at ${"Mutation"}.${"deletePost"}, but that function did not return a step! + console.error(`Wrapped a plan function at ${"Mutation"}.${"deletePostStatus"}, but that function did not return a step! ${String(oldPlan20)}`); throw new Error("Wrapped a plan function, but that function did not return a step!"); } @@ -31514,12 +32039,12 @@ ${String(oldPlan20)}`); } } }, - deletePostStatus: { + deleteUser: { plan(...planParams) { const smartPlan = (...overrideParams) => { const $prev = oldPlan21(...overrideParams.concat(planParams.slice(overrideParams.length))); if (!($prev instanceof ExecutableStep)) { - console.error(`Wrapped a plan function at ${"Mutation"}.${"deletePostStatus"}, but that function did not return a step! + console.error(`Wrapped a plan function at ${"Mutation"}.${"deleteUser"}, but that function did not return a step! ${String(oldPlan21)}`); throw new Error("Wrapped a plan function, but that function did not return a step!"); } @@ -32102,116 +32627,6 @@ ${String(oldPlan21)}`); autoApplyAfterParentApplyPlan: true } }, - CreateUserPayload: { - __assertStep: assertExecutableStep, - clientMutationId($mutation) { - return $mutation.getStepForKey("clientMutationId", !0) ?? constant(null); - }, - user($object) { - return $object.get("result"); - }, - query() { - return rootValue(); - }, - userEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = userUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_userPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } - } - }, - CreateUserInput: { - clientMutationId: { - applyPlan($input, val) { - $input.set("clientMutationId", val.get()); - }, - autoApplyAfterParentApplyPlan: true - }, - user: { - applyPlan($object) { - return $object.getStepForKey("result").setPlan(); - }, - autoApplyAfterParentApplyPlan: true - } - }, - UserInput: { - "__inputPlan": function UserInput_inputPlan() { - return object(Object.create(null)); - }, - rowId: { - applyPlan($insert, val) { - $insert.set("id", val.get()); - }, - autoApplyAfterParentInputPlan: true, - autoApplyAfterParentApplyPlan: true - }, - createdAt: { - applyPlan($insert, val) { - $insert.set("created_at", val.get()); - }, - autoApplyAfterParentInputPlan: true, - autoApplyAfterParentApplyPlan: true - }, - updatedAt: { - applyPlan($insert, val) { - $insert.set("updated_at", val.get()); - }, - autoApplyAfterParentInputPlan: true, - autoApplyAfterParentApplyPlan: true - }, - hidraId: { - applyPlan($insert, val) { - $insert.set("hidra_id", val.get()); - }, - autoApplyAfterParentInputPlan: true, - autoApplyAfterParentApplyPlan: true - }, - username: { - applyPlan($insert, val) { - $insert.set("username", val.get()); - }, - autoApplyAfterParentInputPlan: true, - autoApplyAfterParentApplyPlan: true - }, - firstName: { - applyPlan($insert, val) { - $insert.set("first_name", val.get()); - }, - autoApplyAfterParentInputPlan: true, - autoApplyAfterParentApplyPlan: true - }, - lastName: { - applyPlan($insert, val) { - $insert.set("last_name", val.get()); - }, - autoApplyAfterParentInputPlan: true, - autoApplyAfterParentApplyPlan: true - }, - email: { - applyPlan($insert, val) { - $insert.set("email", val.get()); - }, - autoApplyAfterParentInputPlan: true, - autoApplyAfterParentApplyPlan: true - } - }, CreateMemberPayload: { __assertStep: assertExecutableStep, clientMutationId($mutation) { @@ -32528,6 +32943,123 @@ ${String(oldPlan21)}`); autoApplyAfterParentApplyPlan: true } }, + CreateUserPayload: { + __assertStep: assertExecutableStep, + clientMutationId($mutation) { + return $mutation.getStepForKey("clientMutationId", !0) ?? constant(null); + }, + user($object) { + return $object.get("result"); + }, + query() { + return rootValue(); + }, + userEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = userUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_userPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } + } + }, + CreateUserInput: { + clientMutationId: { + applyPlan($input, val) { + $input.set("clientMutationId", val.get()); + }, + autoApplyAfterParentApplyPlan: true + }, + user: { + applyPlan($object) { + return $object.getStepForKey("result").setPlan(); + }, + autoApplyAfterParentApplyPlan: true + } + }, + UserInput: { + "__inputPlan": function UserInput_inputPlan() { + return object(Object.create(null)); + }, + rowId: { + applyPlan($insert, val) { + $insert.set("id", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + }, + createdAt: { + applyPlan($insert, val) { + $insert.set("created_at", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + }, + updatedAt: { + applyPlan($insert, val) { + $insert.set("updated_at", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + }, + hidraId: { + applyPlan($insert, val) { + $insert.set("hidra_id", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + }, + username: { + applyPlan($insert, val) { + $insert.set("username", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + }, + firstName: { + applyPlan($insert, val) { + $insert.set("first_name", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + }, + lastName: { + applyPlan($insert, val) { + $insert.set("last_name", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + }, + email: { + applyPlan($insert, val) { + $insert.set("email", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + }, + tier: { + applyPlan($insert, val) { + $insert.set("tier", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + } + }, UpdateDownvotePayload: { __assertStep: ObjectStep, clientMutationId($mutation) { @@ -33084,32 +33616,32 @@ ${String(oldPlan21)}`); autoApplyAfterParentApplyPlan: true } }, - UpdateUserPayload: { + UpdateMemberPayload: { __assertStep: ObjectStep, clientMutationId($mutation) { return $mutation.getStepForKey("clientMutationId", !0) ?? constant(null); }, - user($object) { + member($object) { return $object.get("result"); }, query() { return rootValue(); }, - userEdge: { + memberEdge: { plan($mutation, args, info) { const $result = $mutation.getStepForKey("result", !0); if (!$result) return constant(null); const $select = (() => { if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = userUniques[0].attributes.reduce((memo, attributeName) => { + const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { memo[attributeName] = $result.get(attributeName); return memo; }, Object.create(null)); - return resource_userPgResource.find(spec); + return resource_memberPgResource.find(spec); } })(), $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); const $connection = connection($select), $single = $select.row(first($select)); return new EdgeStep($connection, $single); @@ -33119,7 +33651,7 @@ ${String(oldPlan21)}`); } } }, - UpdateUserInput: { + UpdateMemberInput: { clientMutationId: { applyPlan($input, val) { $input.set("clientMutationId", val.get()); @@ -33132,93 +33664,72 @@ ${String(oldPlan21)}`); } } }, - UserPatch: { - "__inputPlan": function UserPatch_inputPlan() { + MemberPatch: { + "__inputPlan": function MemberPatch_inputPlan() { return object(Object.create(null)); }, - rowId: { - applyPlan($insert, val) { - $insert.set("id", val.get()); - }, - autoApplyAfterParentInputPlan: true, - autoApplyAfterParentApplyPlan: true - }, - createdAt: { - applyPlan($insert, val) { - $insert.set("created_at", val.get()); - }, - autoApplyAfterParentInputPlan: true, - autoApplyAfterParentApplyPlan: true - }, - updatedAt: { - applyPlan($insert, val) { - $insert.set("updated_at", val.get()); - }, - autoApplyAfterParentInputPlan: true, - autoApplyAfterParentApplyPlan: true - }, - hidraId: { + userId: { applyPlan($insert, val) { - $insert.set("hidra_id", val.get()); + $insert.set("user_id", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - username: { + organizationId: { applyPlan($insert, val) { - $insert.set("username", val.get()); + $insert.set("organization_id", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - firstName: { + createdAt: { applyPlan($insert, val) { - $insert.set("first_name", val.get()); + $insert.set("created_at", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - lastName: { + role: { applyPlan($insert, val) { - $insert.set("last_name", val.get()); + $insert.set("role", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - email: { + rowId: { applyPlan($insert, val) { - $insert.set("email", val.get()); + $insert.set("id", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true } }, - UpdateMemberPayload: { + UpdatePostPayload: { __assertStep: ObjectStep, clientMutationId($mutation) { return $mutation.getStepForKey("clientMutationId", !0) ?? constant(null); }, - member($object) { + post($object) { return $object.get("result"); }, query() { return rootValue(); }, - memberEdge: { + postEdge: { plan($mutation, args, info) { const $result = $mutation.getStepForKey("result", !0); if (!$result) return constant(null); const $select = (() => { if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { + const spec = postUniques[0].attributes.reduce((memo, attributeName) => { memo[attributeName] = $result.get(attributeName); return memo; }, Object.create(null)); - return resource_memberPgResource.find(spec); + return resource_postPgResource.find(spec); } })(), $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); const $connection = connection($select), $single = $select.row(first($select)); return new EdgeStep($connection, $single); @@ -33228,7 +33739,7 @@ ${String(oldPlan21)}`); } } }, - UpdateMemberInput: { + UpdatePostInput: { clientMutationId: { applyPlan($input, val) { $input.set("clientMutationId", val.get()); @@ -33241,20 +33752,41 @@ ${String(oldPlan21)}`); } } }, - MemberPatch: { - "__inputPlan": function MemberPatch_inputPlan() { + PostPatch: { + "__inputPlan": function PostPatch_inputPlan() { return object(Object.create(null)); }, - userId: { + rowId: { applyPlan($insert, val) { - $insert.set("user_id", val.get()); + $insert.set("id", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - organizationId: { + title: { applyPlan($insert, val) { - $insert.set("organization_id", val.get()); + $insert.set("title", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + }, + description: { + applyPlan($insert, val) { + $insert.set("description", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + }, + projectId: { + applyPlan($insert, val) { + $insert.set("project_id", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + }, + userId: { + applyPlan($insert, val) { + $insert.set("user_id", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true @@ -33266,47 +33798,54 @@ ${String(oldPlan21)}`); autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - role: { + updatedAt: { applyPlan($insert, val) { - $insert.set("role", val.get()); + $insert.set("updated_at", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - rowId: { + statusId: { applyPlan($insert, val) { - $insert.set("id", val.get()); + $insert.set("status_id", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + }, + statusUpdatedAt: { + applyPlan($insert, val) { + $insert.set("status_updated_at", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true } }, - UpdatePostPayload: { + UpdatePostStatusPayload: { __assertStep: ObjectStep, clientMutationId($mutation) { return $mutation.getStepForKey("clientMutationId", !0) ?? constant(null); }, - post($object) { + postStatus($object) { return $object.get("result"); }, query() { return rootValue(); }, - postEdge: { + postStatusEdge: { plan($mutation, args, info) { const $result = $mutation.getStepForKey("result", !0); if (!$result) return constant(null); const $select = (() => { if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = postUniques[0].attributes.reduce((memo, attributeName) => { + const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { memo[attributeName] = $result.get(attributeName); return memo; }, Object.create(null)); - return resource_postPgResource.find(spec); + return resource_post_statusPgResource.find(spec); } })(), $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); const $connection = connection($select), $single = $select.row(first($select)); return new EdgeStep($connection, $single); @@ -33316,7 +33855,7 @@ ${String(oldPlan21)}`); } } }, - UpdatePostInput: { + UpdatePostStatusInput: { clientMutationId: { applyPlan($input, val) { $input.set("clientMutationId", val.get()); @@ -33329,8 +33868,8 @@ ${String(oldPlan21)}`); } } }, - PostPatch: { - "__inputPlan": function PostPatch_inputPlan() { + PostStatusPatch: { + "__inputPlan": function PostStatusPatch_inputPlan() { return object(Object.create(null)); }, rowId: { @@ -33340,9 +33879,9 @@ ${String(oldPlan21)}`); autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - title: { + status: { applyPlan($insert, val) { - $insert.set("title", val.get()); + $insert.set("status", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true @@ -33354,6 +33893,13 @@ ${String(oldPlan21)}`); autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, + color: { + applyPlan($insert, val) { + $insert.set("color", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + }, projectId: { applyPlan($insert, val) { $insert.set("project_id", val.get()); @@ -33361,9 +33907,9 @@ ${String(oldPlan21)}`); autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - userId: { + isDefault: { applyPlan($insert, val) { - $insert.set("user_id", val.get()); + $insert.set("is_default", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true @@ -33381,48 +33927,34 @@ ${String(oldPlan21)}`); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true - }, - statusId: { - applyPlan($insert, val) { - $insert.set("status_id", val.get()); - }, - autoApplyAfterParentInputPlan: true, - autoApplyAfterParentApplyPlan: true - }, - statusUpdatedAt: { - applyPlan($insert, val) { - $insert.set("status_updated_at", val.get()); - }, - autoApplyAfterParentInputPlan: true, - autoApplyAfterParentApplyPlan: true } }, - UpdatePostStatusPayload: { + UpdateUserPayload: { __assertStep: ObjectStep, clientMutationId($mutation) { return $mutation.getStepForKey("clientMutationId", !0) ?? constant(null); }, - postStatus($object) { + user($object) { return $object.get("result"); }, query() { return rootValue(); }, - postStatusEdge: { + userEdge: { plan($mutation, args, info) { const $result = $mutation.getStepForKey("result", !0); if (!$result) return constant(null); const $select = (() => { if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { + const spec = userUniques[0].attributes.reduce((memo, attributeName) => { memo[attributeName] = $result.get(attributeName); return memo; }, Object.create(null)); - return resource_post_statusPgResource.find(spec); + return resource_userPgResource.find(spec); } })(), $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); + applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); const $connection = connection($select), $single = $select.row(first($select)); return new EdgeStep($connection, $single); @@ -33432,7 +33964,7 @@ ${String(oldPlan21)}`); } } }, - UpdatePostStatusInput: { + UpdateUserInput: { clientMutationId: { applyPlan($input, val) { $input.set("clientMutationId", val.get()); @@ -33445,8 +33977,8 @@ ${String(oldPlan21)}`); } } }, - PostStatusPatch: { - "__inputPlan": function PostStatusPatch_inputPlan() { + UserPatch: { + "__inputPlan": function UserPatch_inputPlan() { return object(Object.create(null)); }, rowId: { @@ -33456,51 +33988,58 @@ ${String(oldPlan21)}`); autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - status: { + createdAt: { applyPlan($insert, val) { - $insert.set("status", val.get()); + $insert.set("created_at", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - description: { + updatedAt: { applyPlan($insert, val) { - $insert.set("description", val.get()); + $insert.set("updated_at", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - color: { + hidraId: { applyPlan($insert, val) { - $insert.set("color", val.get()); + $insert.set("hidra_id", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - projectId: { + username: { applyPlan($insert, val) { - $insert.set("project_id", val.get()); + $insert.set("username", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - isDefault: { + firstName: { applyPlan($insert, val) { - $insert.set("is_default", val.get()); + $insert.set("first_name", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - createdAt: { + lastName: { applyPlan($insert, val) { - $insert.set("created_at", val.get()); + $insert.set("last_name", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true }, - updatedAt: { + email: { applyPlan($insert, val) { - $insert.set("updated_at", val.get()); + $insert.set("email", val.get()); + }, + autoApplyAfterParentInputPlan: true, + autoApplyAfterParentApplyPlan: true + }, + tier: { + applyPlan($insert, val) { + $insert.set("tier", val.get()); }, autoApplyAfterParentInputPlan: true, autoApplyAfterParentApplyPlan: true @@ -33764,32 +34303,32 @@ ${String(oldPlan21)}`); }, rowId: undefined }, - DeleteUserPayload: { + DeleteMemberPayload: { __assertStep: ObjectStep, clientMutationId($mutation) { return $mutation.getStepForKey("clientMutationId", !0) ?? constant(null); }, - user($object) { + member($object) { return $object.get("result"); }, query() { return rootValue(); }, - userEdge: { + memberEdge: { plan($mutation, args, info) { const $result = $mutation.getStepForKey("result", !0); if (!$result) return constant(null); const $select = (() => { if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = userUniques[0].attributes.reduce((memo, attributeName) => { + const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { memo[attributeName] = $result.get(attributeName); return memo; }, Object.create(null)); - return resource_userPgResource.find(spec); + return resource_memberPgResource.find(spec); } })(), $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); const $connection = connection($select), $single = $select.row(first($select)); return new EdgeStep($connection, $single); @@ -33799,7 +34338,7 @@ ${String(oldPlan21)}`); } } }, - DeleteUserInput: { + DeleteMemberInput: { clientMutationId: { applyPlan($input, val) { $input.set("clientMutationId", val.get()); @@ -33807,32 +34346,32 @@ ${String(oldPlan21)}`); }, rowId: undefined }, - DeleteMemberPayload: { + DeletePostPayload: { __assertStep: ObjectStep, clientMutationId($mutation) { return $mutation.getStepForKey("clientMutationId", !0) ?? constant(null); }, - member($object) { + post($object) { return $object.get("result"); }, query() { return rootValue(); }, - memberEdge: { + postEdge: { plan($mutation, args, info) { const $result = $mutation.getStepForKey("result", !0); if (!$result) return constant(null); const $select = (() => { if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { + const spec = postUniques[0].attributes.reduce((memo, attributeName) => { memo[attributeName] = $result.get(attributeName); return memo; }, Object.create(null)); - return resource_memberPgResource.find(spec); + return resource_postPgResource.find(spec); } })(), $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); const $connection = connection($select), $single = $select.row(first($select)); return new EdgeStep($connection, $single); @@ -33842,7 +34381,7 @@ ${String(oldPlan21)}`); } } }, - DeleteMemberInput: { + DeletePostInput: { clientMutationId: { applyPlan($input, val) { $input.set("clientMutationId", val.get()); @@ -33850,32 +34389,32 @@ ${String(oldPlan21)}`); }, rowId: undefined }, - DeletePostPayload: { + DeletePostStatusPayload: { __assertStep: ObjectStep, clientMutationId($mutation) { return $mutation.getStepForKey("clientMutationId", !0) ?? constant(null); }, - post($object) { + postStatus($object) { return $object.get("result"); }, query() { return rootValue(); }, - postEdge: { + postStatusEdge: { plan($mutation, args, info) { const $result = $mutation.getStepForKey("result", !0); if (!$result) return constant(null); const $select = (() => { if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = postUniques[0].attributes.reduce((memo, attributeName) => { + const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { memo[attributeName] = $result.get(attributeName); return memo; }, Object.create(null)); - return resource_postPgResource.find(spec); + return resource_post_statusPgResource.find(spec); } })(), $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); const $connection = connection($select), $single = $select.row(first($select)); return new EdgeStep($connection, $single); @@ -33885,7 +34424,7 @@ ${String(oldPlan21)}`); } } }, - DeletePostInput: { + DeletePostStatusInput: { clientMutationId: { applyPlan($input, val) { $input.set("clientMutationId", val.get()); @@ -33893,32 +34432,32 @@ ${String(oldPlan21)}`); }, rowId: undefined }, - DeletePostStatusPayload: { + DeleteUserPayload: { __assertStep: ObjectStep, clientMutationId($mutation) { return $mutation.getStepForKey("clientMutationId", !0) ?? constant(null); }, - postStatus($object) { + user($object) { return $object.get("result"); }, query() { return rootValue(); }, - postStatusEdge: { + userEdge: { plan($mutation, args, info) { const $result = $mutation.getStepForKey("result", !0); if (!$result) return constant(null); const $select = (() => { if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { + const spec = userUniques[0].attributes.reduce((memo, attributeName) => { memo[attributeName] = $result.get(attributeName); return memo; }, Object.create(null)); - return resource_post_statusPgResource.find(spec); + return resource_userPgResource.find(spec); } })(), $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); + applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); const $connection = connection($select), $single = $select.row(first($select)); return new EdgeStep($connection, $single); @@ -33928,7 +34467,7 @@ ${String(oldPlan21)}`); } } }, - DeletePostStatusInput: { + DeleteUserInput: { clientMutationId: { applyPlan($input, val) { $input.set("clientMutationId", val.get()); From e0acda82ab37800973b09240080236fc4090182b Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Wed, 16 Apr 2025 21:54:00 -0500 Subject: [PATCH 19/29] fix: fix file extensions --- src/scripts/seedDatabase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/seedDatabase.ts b/src/scripts/seedDatabase.ts index a8118c6..3781cfb 100644 --- a/src/scripts/seedDatabase.ts +++ b/src/scripts/seedDatabase.ts @@ -2,7 +2,7 @@ import dayjs from "dayjs"; import { drizzle } from "drizzle-orm/node-postgres"; import { reset, seed } from "drizzle-seed"; -import { DATABASE_URL, isDevEnv } from "lib/config/env"; +import { DATABASE_URL, isDevEnv } from "lib/config/env.config"; import * as schema from "lib/drizzle/schema"; /** From 680e943d66afa9da81e336a7f713bccbeca3e848 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Wed, 16 Apr 2025 22:39:59 -0500 Subject: [PATCH 20/29] chore(env): update TODOs --- .env.development | 2 +- .env.production | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 2c8af4c..1f2d916 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -# TODO change once base path changes +# TODO change once base path changes (https://linear.app/omnidev/issue/OMNI-254/move-apiauth-paths-to-base-path-or-subpath-eg-auth) AUTH_BASE_URL="https://localhost:8000/api/auth" AUTH_JWKS_URL="https://localhost:8000/api/auth/jwks" diff --git a/.env.production b/.env.production index e889e82..93cf427 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ -# TODO change once base path changes +# TODO change once base path changes (https://linear.app/omnidev/issue/OMNI-254/move-apiauth-paths-to-base-path-or-subpath-eg-auth) AUTH_BASE_URL="https://identity.omni.dev/api/auth" AUTH_JWKS_URL="https://identity.omni.dev/api/auth/jwks" From 9fa7321be437d368bc29aac0d5303dd827dcbfc2 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Thu, 17 Apr 2025 10:36:33 -0500 Subject: [PATCH 21/29] chore(env): remove `AUTH_JWKS_URL` --- .env.development | 1 - .env.production | 1 - src/lib/config/env.config.ts | 1 - src/lib/plugins/envelop/useAuth.plugin.ts | 7 ++----- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.env.development b/.env.development index 1f2d916..5a5e098 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,2 @@ # TODO change once base path changes (https://linear.app/omnidev/issue/OMNI-254/move-apiauth-paths-to-base-path-or-subpath-eg-auth) AUTH_BASE_URL="https://localhost:8000/api/auth" -AUTH_JWKS_URL="https://localhost:8000/api/auth/jwks" diff --git a/.env.production b/.env.production index 93cf427..c30c03a 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,2 @@ # TODO change once base path changes (https://linear.app/omnidev/issue/OMNI-254/move-apiauth-paths-to-base-path-or-subpath-eg-auth) AUTH_BASE_URL="https://identity.omni.dev/api/auth" -AUTH_JWKS_URL="https://identity.omni.dev/api/auth/jwks" diff --git a/src/lib/config/env.config.ts b/src/lib/config/env.config.ts index 6c7c6ea..2264ad8 100644 --- a/src/lib/config/env.config.ts +++ b/src/lib/config/env.config.ts @@ -8,7 +8,6 @@ export const { HOST = "0.0.0.0", DATABASE_URL, AUTH_BASE_URL, - AUTH_JWKS_URL, } = process.env; export const isDevEnv = NODE_ENV === "development"; diff --git a/src/lib/plugins/envelop/useAuth.plugin.ts b/src/lib/plugins/envelop/useAuth.plugin.ts index a7d955c..d71c905 100644 --- a/src/lib/plugins/envelop/useAuth.plugin.ts +++ b/src/lib/plugins/envelop/useAuth.plugin.ts @@ -1,10 +1,7 @@ import { useGenericAuth } from "@envelop/generic-auth"; import type * as jose from "jose"; -import { - AUTH_BASE_URL, - // AUTH_JWKS_URL -} from "lib/config/env.config"; +import { AUTH_BASE_URL } from "lib/config/env.config"; import { users } from "lib/drizzle/schema"; import type { ResolveUserFn } from "@envelop/generic-auth"; @@ -35,7 +32,7 @@ const resolveUser: ResolveUserFn = async ( const idToken: jose.JWTPayload = await userInfo.json(); // TODO validate token, currently major security flaw - // const jwks = jose.createRemoteJWKSet(new URL(AUTH_JWKS_URL!)); + // const jwks = jose.createRemoteJWKSet(new URL(`${AUTH_BASE_URL}/jwks`)); // const { payload } = await jose.jwtVerify(sessionToken, jwks); // if (!payload) throw new Error("Invalid or missing session token"); From 67dabdb5fa4df4c6031888de358edffea23a33a9 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Thu, 17 Apr 2025 11:15:47 -0500 Subject: [PATCH 22/29] chore(use-auth): update TODOs --- src/lib/plugins/envelop/useAuth.plugin.ts | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/lib/plugins/envelop/useAuth.plugin.ts b/src/lib/plugins/envelop/useAuth.plugin.ts index d71c905..61d8f29 100644 --- a/src/lib/plugins/envelop/useAuth.plugin.ts +++ b/src/lib/plugins/envelop/useAuth.plugin.ts @@ -1,5 +1,5 @@ import { useGenericAuth } from "@envelop/generic-auth"; -import type * as jose from "jose"; +import * as jose from "jose"; import { AUTH_BASE_URL } from "lib/config/env.config"; import { users } from "lib/drizzle/schema"; @@ -8,6 +8,8 @@ import type { ResolveUserFn } from "@envelop/generic-auth"; import type { InsertUser, SelectUser } from "lib/drizzle/schema"; import type { GraphQLContext } from "lib/graphql"; +// TODO research best practices for all of this file (token validation, caching, etc.). Validate access token (introspection endpoint)? Cache userinfo output? etc. (https://linear.app/omnidev/issue/OMNI-302/increase-security-of-useauth-plugin) + /** * Validate user session and resolve user if successful. * @see https://the-guild.dev/graphql/envelop/plugins/use-generic-auth#getting-started @@ -16,25 +18,29 @@ const resolveUser: ResolveUserFn = async ( context, ) => { try { - const sessionToken = context.request.headers + const accessToken = context.request.headers .get("authorization") ?.split("Bearer ")[1]; - if (!sessionToken) throw new Error("Invalid or missing session token"); + if (!accessToken) throw new Error("Invalid or missing access token"); + + // TODO validate access token (introspection endpoint?) here? - // TODO verify best practices for this + // TODO cache so this doesn't occur on every request. Research best practices const userInfo = await fetch(`${AUTH_BASE_URL}/oauth2/userinfo`, { headers: { - Authorization: `Bearer ${sessionToken}`, + Authorization: `Bearer ${accessToken}`, }, }); + if (!userInfo.ok) throw new Error("Invalid access token or request failed"); + const idToken: jose.JWTPayload = await userInfo.json(); - // TODO validate token, currently major security flaw + // TODO validate token, currently major security flaw (pending BA OIDC JWKS support: https://www.better-auth.com/docs/plugins/oidc-provider#jwks-endpoint-not-fully-implemented) (https://linear.app/omnidev/issue/OMNI-302/validate-id-token-with-jwks) // const jwks = jose.createRemoteJWKSet(new URL(`${AUTH_BASE_URL}/jwks`)); - // const { payload } = await jose.jwtVerify(sessionToken, jwks); - // if (!payload) throw new Error("Invalid or missing session token"); + // const { payload } = await jose.jwtVerify(JSON.stringify(idToken), jwks); + // if (!payload) throw new Error("Failed to verify token"); const insertedUser: InsertUser = { hidraId: idToken.sub!, From b44f7e60fe76e683ed8e5bc434c53259ec4f63a4 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Thu, 17 Apr 2025 12:24:53 -0500 Subject: [PATCH 23/29] build(deps): upgrade Graphile dependencies --- bun.lock | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bun.lock b/bun.lock index 008665f..a881012 100644 --- a/bun.lock +++ b/bun.lock @@ -8,11 +8,11 @@ "@envelop/validation-cache": "^8.1.3", "@escape.tech/graphql-armor": "^3.1.2", "@graphile/pg-aggregates": "0.2.0-beta.7", - "@graphile/simplify-inflection": "8.0.0-beta.5", + "@graphile/simplify-inflection": "8.0.0-beta.6", "dayjs": "^1.11.13", "drizzle-orm": "^0.41.0", "drizzle-seed": "^0.3.1", - "graphile-export": "0.0.2-beta.24", + "graphile-export": "0.0.2-beta.26", "graphql": "^16.10.0", "graphql-yoga": "^5.13.2", "hono": "^4.7.5", @@ -169,7 +169,7 @@ "@graphile/pg-aggregates": ["@graphile/pg-aggregates@0.2.0-beta.7", "", { "peerDependencies": { "graphile-build": "^5.0.0-beta.27", "graphile-build-pg": "^5.0.0-beta.31", "graphql": "^16.1.0-experimental-stream-defer.6" }, "optionalPeers": ["graphile-build", "graphile-build-pg", "graphql"] }, "sha512-XaVAzlB1S1UzAmet7dZcoW3AnDGT2qrQqXCRIGJKeu7i76D/SIR5hZs+mytYOjfwuJsHsBBDtmlRORMaUKkJxw=="], - "@graphile/simplify-inflection": ["@graphile/simplify-inflection@8.0.0-beta.5", "", {}, "sha512-1XaXGe5i5wRR/Uh2cvkt9KlFoXq/e7a3GYSdZtQnp68gIOdgcys2T24VNYsiekBhzcp5CCCcUJJdUvV2bvS21Q=="], + "@graphile/simplify-inflection": ["@graphile/simplify-inflection@8.0.0-beta.6", "", {}, "sha512-GFfQtUgX3yLj3XWY9vHrhOfkkCdoW2oqJgJdjQs3qYKqTHViKFch91NguUnw3z+4X1DgYb+qx10leTo+tZ+UeA=="], "@graphql-tools/executor": ["@graphql-tools/executor@1.3.11", "", { "dependencies": { "@graphql-tools/utils": "^10.7.1", "@graphql-typed-document-node/core": "^3.2.0", "@repeaterjs/repeater": "^3.0.4", "@whatwg-node/disposablestack": "^0.0.5", "tslib": "^2.4.0", "value-or-promise": "^1.0.12" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-7Q1IwIuSgarDeaCOZ1VMZvGaWY7cD2jj+uTNn/PsenYYKqFWKH30UylEK67ZTpVMXqBJctFaxVnPP7KM0+LPWg=="], @@ -313,7 +313,7 @@ "graphile-config": ["graphile-config@0.0.1-beta.14", "", { "dependencies": { "@types/interpret": "^1.1.1", "@types/node": "^20.5.7", "@types/semver": "^7.5.1", "chalk": "^4.1.2", "debug": "^4.3.4", "interpret": "^3.1.1", "semver": "^7.5.4", "tslib": "^2.6.2", "yargs": "^17.7.2" } }, "sha512-3FlhyRKz4LvIbY4AXn4EI8DSTdSYsg0WRfX6U9QeytGta9aiefF1QqSiC1ocXUlNJUMBfm28dy0eL669ljYRwg=="], - "graphile-export": ["graphile-export@0.0.2-beta.24", "", { "dependencies": { "@babel/generator": "^7.25.6", "@babel/parser": "^7.25.6", "@babel/template": "^7.25.0", "@babel/traverse": "^7.25.6", "@babel/types": "^7.25.6", "@types/node": "^20.5.7", "prettier": "^3.0.3", "tslib": "^2.6.2" }, "peerDependencies": { "eslint": "^8.48.0", "grafast": "^0.1.1-beta.19", "pg-sql2": "^5.0.0-beta.7" }, "optionalPeers": ["eslint", "pg-sql2"] }, "sha512-nu24HgtCc2G5lfAK5EkzWcE6Vv9TTTJrzutTjnOVJ5Zbdp55XBPrk0y0TWJulGjcj3Do3y+gz0T9Ldzil89yxg=="], + "graphile-export": ["graphile-export@0.0.2-beta.26", "", { "dependencies": { "@babel/generator": "^7.25.6", "@babel/parser": "^7.25.6", "@babel/template": "^7.25.0", "@babel/traverse": "^7.25.6", "@babel/types": "^7.25.6", "@types/node": "^20.5.7", "prettier": "^3.0.3", "tslib": "^2.6.2" }, "peerDependencies": { "eslint": "^8.48.0", "grafast": "^0.1.1-beta.21", "pg-sql2": "^5.0.0-beta.8" }, "optionalPeers": ["eslint", "pg-sql2"] }, "sha512-F/VwojFj+UWKUcL5kiLeeYNLTKJzK19rC9rZO1Ga/4NVCAAx2azscocDKlpJE7W+LYcPwtZkYhESKwfLOts8zw=="], "graphile-utils": ["graphile-utils@5.0.0-beta.36", "", { "dependencies": { "debug": "^4.3.4", "json5": "^2.2.3", "tslib": "^2.6.2" }, "peerDependencies": { "@dataplan/pg": "^0.0.1-beta.30", "grafast": "^0.1.1-beta.19", "graphile-build": "^5.0.0-beta.31", "graphile-build-pg": "^5.0.0-beta.36", "graphile-config": "^0.0.1-beta.14", "graphql": "^16.1.0-experimental-stream-defer.6", "tamedevil": "^0.0.0-beta.7" }, "optionalPeers": ["@dataplan/pg", "graphile-build-pg"] }, "sha512-Bo3PEOzLhlcs/NtaTXb2XSVazQxkQzMLkaxY7f0GWMImMfPZJekJW5zcOKVYLeljjXnfCMGkYsYddvtcwbha5w=="], diff --git a/package.json b/package.json index 7927492..b440b9c 100644 --- a/package.json +++ b/package.json @@ -37,11 +37,11 @@ "@envelop/validation-cache": "^8.1.3", "@escape.tech/graphql-armor": "^3.1.2", "@graphile/pg-aggregates": "0.2.0-beta.7", - "@graphile/simplify-inflection": "8.0.0-beta.5", + "@graphile/simplify-inflection": "8.0.0-beta.6", "dayjs": "^1.11.13", "drizzle-orm": "^0.41.0", "drizzle-seed": "^0.3.1", - "graphile-export": "0.0.2-beta.24", + "graphile-export": "0.0.2-beta.26", "graphql": "^16.10.0", "graphql-yoga": "^5.13.2", "hono": "^4.7.5", From 2efd1da56cf6c3bf2a9629c60e7ea3d35b920a88 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Thu, 17 Apr 2025 21:13:37 -0500 Subject: [PATCH 24/29] build(scripts): generate and migrate DB before starting --- package.json | 7 +- src/generated/graphql/schema.executable.ts | 6126 +++++++++----------- 2 files changed, 2776 insertions(+), 3357 deletions(-) diff --git a/package.json b/package.json index b440b9c..afd767c 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "GRAPHILE_ENV=development NODE_ENV=development bun run --hot src/server.ts", "build": "bun build --target node --outdir build src/server.ts", - "start": "GRAPHILE_ENV=production NODE_ENV=production bun run build/server.js", + "start": "GRAPHILE_ENV=production NODE_ENV=production bun db:generate && GRAPHILE_ENV=production NODE_ENV=production bun db:migrate && GRAPHILE_ENV=production NODE_ENV=production bun run build/server.js", "lint": "biome lint src", "format": "biome format --write src", "db:check": "bun --env-file .env.local drizzle-kit check", @@ -50,5 +50,8 @@ "postgraphile": "5.0.0-beta.37", "postgraphile-plugin-connection-filter": "3.0.0-beta.7" }, - "trustedDependencies": ["@biomejs/biome", "esbuild"] + "trustedDependencies": [ + "@biomejs/biome", + "esbuild" + ] } diff --git a/src/generated/graphql/schema.executable.ts b/src/generated/graphql/schema.executable.ts index e7e4ae5..218f021 100644 --- a/src/generated/graphql/schema.executable.ts +++ b/src/generated/graphql/schema.executable.ts @@ -34,7 +34,8 @@ const handler = { return constant`query`; } }; -const nodeIdCodecs = Object.assign(Object.create(null), { +const nodeIdCodecs = { + __proto__: null, raw: handler.codec, base64JSON: { name: "base64JSON", @@ -66,10 +67,11 @@ const nodeIdCodecs = Object.assign(Object.create(null), { isSyncAndSafe: true }) } -}); -const nodeIdHandlerByTypeName = Object.assign(Object.create(null), { +}; +const nodeIdHandlerByTypeName = { + __proto__: null, Query: handler -}); +}; const executor = new PgExecutor({ name: "main", context() { @@ -84,7 +86,8 @@ const downvoteIdentifier = sql.identifier("public", "downvote"); const spec_downvote = { name: "downvote", identifier: downvoteIdentifier, - attributes: Object.assign(Object.create(null), { + attributes: { + __proto__: null, id: { description: undefined, codec: TYPES.uuid, @@ -145,17 +148,19 @@ const spec_downvote = { canUpdate: true } } - }), + }, description: undefined, extensions: { - oid: "62509", + oid: "64252", isTableLike: true, pg: { serviceName: "main", schemaName: "public", name: "downvote" }, - tags: Object.create(null) + tags: { + __proto__: null + } }, executor: executor }; @@ -164,7 +169,8 @@ const invitationIdentifier = sql.identifier("public", "invitation"); const spec_invitation = { name: "invitation", identifier: invitationIdentifier, - attributes: Object.assign(Object.create(null), { + attributes: { + __proto__: null, id: { description: undefined, codec: TYPES.uuid, @@ -225,17 +231,19 @@ const spec_invitation = { canUpdate: true } } - }), + }, description: undefined, extensions: { - oid: "62609", + oid: "64351", isTableLike: true, pg: { serviceName: "main", schemaName: "public", name: "invitation" }, - tags: Object.create(null) + tags: { + __proto__: null + } }, executor: executor }; @@ -244,7 +252,8 @@ const upvoteIdentifier = sql.identifier("public", "upvote"); const spec_upvote = { name: "upvote", identifier: upvoteIdentifier, - attributes: Object.assign(Object.create(null), { + attributes: { + __proto__: null, id: { description: undefined, codec: TYPES.uuid, @@ -305,17 +314,19 @@ const spec_upvote = { canUpdate: true } } - }), + }, description: undefined, extensions: { - oid: "62422", + oid: "64165", isTableLike: true, pg: { serviceName: "main", schemaName: "public", name: "upvote" }, - tags: Object.create(null) + tags: { + __proto__: null + } }, executor: executor }; @@ -324,7 +335,8 @@ const commentIdentifier = sql.identifier("public", "comment"); const spec_comment = { name: "comment", identifier: commentIdentifier, - attributes: Object.assign(Object.create(null), { + attributes: { + __proto__: null, id: { description: undefined, codec: TYPES.uuid, @@ -397,17 +409,19 @@ const spec_comment = { canUpdate: true } } - }), + }, description: undefined, extensions: { - oid: "62489", + oid: "64232", isTableLike: true, pg: { serviceName: "main", schemaName: "public", name: "comment" }, - tags: Object.create(null) + tags: { + __proto__: null + } }, executor: executor }; @@ -416,7 +430,8 @@ const organizationIdentifier = sql.identifier("public", "organization"); const spec_organization = { name: "organization", identifier: organizationIdentifier, - attributes: Object.assign(Object.create(null), { + attributes: { + __proto__: null, id: { description: undefined, codec: TYPES.uuid, @@ -469,7 +484,7 @@ const spec_organization = { description: undefined, codec: TYPES.text, notNull: true, - hasDefault: true, + hasDefault: false, extensions: { tags: {}, canSelect: true, @@ -477,17 +492,19 @@ const spec_organization = { canUpdate: true } } - }), + }, description: undefined, extensions: { - oid: "62384", + oid: "64127", isTableLike: true, pg: { serviceName: "main", schemaName: "public", name: "organization" }, - tags: Object.create(null) + tags: { + __proto__: null + } }, executor: executor }; @@ -496,7 +513,8 @@ const projectIdentifier = sql.identifier("public", "project"); const spec_project = { name: "project", identifier: projectIdentifier, - attributes: Object.assign(Object.create(null), { + attributes: { + __proto__: null, id: { description: undefined, codec: TYPES.uuid, @@ -593,17 +611,19 @@ const spec_project = { canUpdate: true } } - }), + }, description: undefined, extensions: { - oid: "62408", + oid: "64151", isTableLike: true, pg: { serviceName: "main", schemaName: "public", name: "project" }, - tags: Object.create(null) + tags: { + __proto__: null + } }, executor: executor }; @@ -612,7 +632,8 @@ const postIdentifier = sql.identifier("public", "post"); const spec_post = { name: "post", identifier: postIdentifier, - attributes: Object.assign(Object.create(null), { + attributes: { + __proto__: null, id: { description: undefined, codec: TYPES.uuid, @@ -721,17 +742,19 @@ const spec_post = { canUpdate: true } } - }), + }, description: undefined, extensions: { - oid: "62398", + oid: "64141", isTableLike: true, pg: { serviceName: "main", schemaName: "public", name: "post" }, - tags: Object.create(null) + tags: { + __proto__: null + } }, executor: executor }; @@ -742,20 +765,23 @@ const roleCodec = enumCodec({ values: ["owner", "admin", "member"], description: undefined, extensions: { - oid: "62528", + oid: "64271", pg: { serviceName: "main", schemaName: "public", name: "role" }, - tags: Object.create(null) + tags: { + __proto__: null + } } }); const memberIdentifier = sql.identifier("public", "member"); const spec_member = { name: "member", identifier: memberIdentifier, - attributes: Object.assign(Object.create(null), { + attributes: { + __proto__: null, user_id: { description: undefined, codec: TYPES.uuid, @@ -816,17 +842,19 @@ const spec_member = { canUpdate: true } } - }), + }, description: undefined, extensions: { - oid: "62444", + oid: "64187", isTableLike: true, pg: { serviceName: "main", schemaName: "public", name: "member" }, - tags: Object.create(null) + tags: { + __proto__: null + } }, executor: executor }; @@ -835,7 +863,8 @@ const postStatusIdentifier = sql.identifier("public", "post_status"); const spec_postStatus = { name: "postStatus", identifier: postStatusIdentifier, - attributes: Object.assign(Object.create(null), { + attributes: { + __proto__: null, id: { description: undefined, codec: TYPES.uuid, @@ -932,17 +961,19 @@ const spec_postStatus = { canUpdate: true } } - }), + }, description: undefined, extensions: { - oid: "62583", + oid: "64325", isTableLike: true, pg: { serviceName: "main", schemaName: "public", name: "post_status" }, - tags: Object.create(null) + tags: { + __proto__: null + } }, executor: executor }; @@ -951,7 +982,8 @@ const userIdentifier = sql.identifier("public", "user"); const spec_user = { name: "user", identifier: userIdentifier, - attributes: Object.assign(Object.create(null), { + attributes: { + __proto__: null, id: { description: undefined, codec: TYPES.uuid, @@ -1048,17 +1080,19 @@ const spec_user = { canUpdate: true } } - }), + }, description: undefined, extensions: { - oid: "62432", + oid: "64175", isTableLike: true, pg: { serviceName: "main", schemaName: "public", name: "user" }, - tags: Object.create(null) + tags: { + __proto__: null + } }, executor: executor }; @@ -1069,16 +1103,19 @@ const downvoteUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: Object.create(null) + tags: { + __proto__: null + } } }, { isPrimary: false, attributes: ["post_id", "user_id"], description: undefined, extensions: { - tags: Object.assign(Object.create(null), { + tags: { + __proto__: null, behavior: ["-update", "-delete"] - }) + } } }]; const registryConfig_pgResources_downvote_downvote = { @@ -1112,16 +1149,19 @@ const invitationUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: Object.create(null) + tags: { + __proto__: null + } } }, { isPrimary: false, attributes: ["email"], description: undefined, extensions: { - tags: Object.assign(Object.create(null), { + tags: { + __proto__: null, behavior: ["-update", "-delete"] - }) + } } }]; const registryConfig_pgResources_invitation_invitation = { @@ -1155,16 +1195,19 @@ const upvoteUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: Object.create(null) + tags: { + __proto__: null + } } }, { isPrimary: false, attributes: ["post_id", "user_id"], description: undefined, extensions: { - tags: Object.assign(Object.create(null), { + tags: { + __proto__: null, behavior: ["-update", "-delete"] - }) + } } }]; const registryConfig_pgResources_upvote_upvote = { @@ -1198,7 +1241,9 @@ const commentUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: Object.create(null) + tags: { + __proto__: null + } } }]; const registryConfig_pgResources_comment_comment = { @@ -1232,16 +1277,19 @@ const organizationUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: Object.create(null) + tags: { + __proto__: null + } } }, { isPrimary: false, attributes: ["name"], description: undefined, extensions: { - tags: Object.assign(Object.create(null), { + tags: { + __proto__: null, behavior: ["-update", "-delete"] - }) + } } }]; const registryConfig_pgResources_organization_organization = { @@ -1275,7 +1323,9 @@ const projectUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: Object.create(null) + tags: { + __proto__: null + } } }]; const registryConfig_pgResources_project_project = { @@ -1309,7 +1359,9 @@ const postUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: Object.create(null) + tags: { + __proto__: null + } } }]; const registryConfig_pgResources_post_post = { @@ -1343,7 +1395,9 @@ const post_statusUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: Object.create(null) + tags: { + __proto__: null + } } }]; const registryConfig_pgResources_post_status_post_status = { @@ -1377,34 +1431,39 @@ const userUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: Object.create(null) + tags: { + __proto__: null + } } }, { isPrimary: false, attributes: ["email"], description: undefined, extensions: { - tags: Object.assign(Object.create(null), { + tags: { + __proto__: null, behavior: ["-update", "-delete"] - }) + } } }, { isPrimary: false, attributes: ["hidra_id"], description: undefined, extensions: { - tags: Object.assign(Object.create(null), { + tags: { + __proto__: null, behavior: ["-update", "-delete"] - }) + } } }, { isPrimary: false, attributes: ["username"], description: undefined, extensions: { - tags: Object.assign(Object.create(null), { + tags: { + __proto__: null, behavior: ["-update", "-delete"] - }) + } } }]; const registryConfig_pgResources_user_user = { @@ -1438,16 +1497,19 @@ const memberUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: Object.create(null) + tags: { + __proto__: null + } } }, { isPrimary: false, attributes: ["user_id", "organization_id"], description: undefined, extensions: { - tags: Object.assign(Object.create(null), { + tags: { + __proto__: null, behavior: ["-update", "-delete"] - }) + } } }]; const registryConfig_pgResources_member_member = { @@ -1477,10 +1539,12 @@ const registryConfig_pgResources_member_member = { } }; const registryConfig = { - pgExecutors: Object.assign(Object.create(null), { + pgExecutors: { + __proto__: null, main: executor - }), - pgCodecs: Object.assign(Object.create(null), { + }, + pgCodecs: { + __proto__: null, text: TYPES.text, downvote: downvoteCodec, uuid: TYPES.uuid, @@ -1496,8 +1560,9 @@ const registryConfig = { member: memberCodec, postStatus: postStatusCodec, user: userCodec - }), - pgResources: Object.assign(Object.create(null), { + }, + pgResources: { + __proto__: null, f_unaccent: { executor, name: "f_unaccent", @@ -1537,9 +1602,11 @@ const registryConfig = { post_status: registryConfig_pgResources_post_status_post_status, user: registryConfig_pgResources_user_user, member: registryConfig_pgResources_member_member - }), - pgRelations: Object.assign(Object.create(null), { - comment: Object.assign(Object.create(null), { + }, + pgRelations: { + __proto__: null, + comment: { + __proto__: null, postByMyPostId: { localCodec: commentCodec, remoteResourceOptions: registryConfig_pgResources_post_post, @@ -1570,8 +1637,9 @@ const registryConfig = { } } } - }), - downvote: Object.assign(Object.create(null), { + }, + downvote: { + __proto__: null, postByMyPostId: { localCodec: downvoteCodec, remoteResourceOptions: registryConfig_pgResources_post_post, @@ -1602,8 +1670,9 @@ const registryConfig = { } } } - }), - invitation: Object.assign(Object.create(null), { + }, + invitation: { + __proto__: null, organizationByMyOrganizationId: { localCodec: invitationCodec, remoteResourceOptions: registryConfig_pgResources_organization_organization, @@ -1619,8 +1688,9 @@ const registryConfig = { } } } - }), - member: Object.assign(Object.create(null), { + }, + member: { + __proto__: null, organizationByMyOrganizationId: { localCodec: memberCodec, remoteResourceOptions: registryConfig_pgResources_organization_organization, @@ -1651,8 +1721,9 @@ const registryConfig = { } } } - }), - organization: Object.assign(Object.create(null), { + }, + organization: { + __proto__: null, projectsByTheirOrganizationId: { localCodec: organizationCodec, remoteResourceOptions: registryConfig_pgResources_project_project, @@ -1698,8 +1769,9 @@ const registryConfig = { } } } - }), - post: Object.assign(Object.create(null), { + }, + post: { + __proto__: null, projectByMyProjectId: { localCodec: postCodec, remoteResourceOptions: registryConfig_pgResources_project_project, @@ -1790,8 +1862,9 @@ const registryConfig = { } } } - }), - postStatus: Object.assign(Object.create(null), { + }, + postStatus: { + __proto__: null, projectByMyProjectId: { localCodec: postStatusCodec, remoteResourceOptions: registryConfig_pgResources_project_project, @@ -1822,8 +1895,9 @@ const registryConfig = { } } } - }), - project: Object.assign(Object.create(null), { + }, + project: { + __proto__: null, organizationByMyOrganizationId: { localCodec: projectCodec, remoteResourceOptions: registryConfig_pgResources_organization_organization, @@ -1869,8 +1943,9 @@ const registryConfig = { } } } - }), - upvote: Object.assign(Object.create(null), { + }, + upvote: { + __proto__: null, postByMyPostId: { localCodec: upvoteCodec, remoteResourceOptions: registryConfig_pgResources_post_post, @@ -1901,8 +1976,9 @@ const registryConfig = { } } } - }), - user: Object.assign(Object.create(null), { + }, + user: { + __proto__: null, postsByTheirUserId: { localCodec: userCodec, remoteResourceOptions: registryConfig_pgResources_post_post, @@ -1978,8 +2054,8 @@ const registryConfig = { } } } - }) - }) + } + } }; const registry = makeRegistry(registryConfig); const resource_downvotePgResource = registry.pgResources["downvote"]; @@ -2034,6 +2110,21 @@ const makeArgs = (args, path = []) => { return selectArgs; }; const resource_f_unaccentPgResource = registry.pgResources["f_unaccent"]; +function Query_downvotesfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Query_downvoteslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Query_downvotesoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Query_downvotesbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Query_downvotesafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} const applyOrderToPlan = ($select, $value, TableOrderByType) => { if (!("evalLength" in $value)) return; const length = $value.evalLength(); @@ -2049,6 +2140,15 @@ const applyOrderToPlan = ($select, $value, TableOrderByType) => { plan($select); } }; +function Query_downvotesorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); + return null; +} +const Query_downvotesconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2061,6 +2161,35 @@ function assertAllowed(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Query_downvotesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Query_invitationsfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Query_invitationslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Query_invitationsoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Query_invitationsbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Query_invitationsafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Query_invitationsorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); + return null; +} +const Query_invitationsconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed2(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2073,6 +2202,35 @@ function assertAllowed2(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Query_invitationsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed2(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Query_upvotesfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Query_upvoteslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Query_upvotesoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Query_upvotesbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Query_upvotesafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Query_upvotesorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); + return null; +} +const Query_upvotesconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed3(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2085,6 +2243,35 @@ function assertAllowed3(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Query_upvotesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed3(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Query_commentsfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Query_commentslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Query_commentsoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Query_commentsbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Query_commentsafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Query_commentsorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); + return null; +} +const Query_commentsconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed4(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2097,6 +2284,35 @@ function assertAllowed4(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Query_commentsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed4(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Query_organizationsfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Query_organizationslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Query_organizationsoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Query_organizationsbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Query_organizationsafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Query_organizationsorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); + return null; +} +const Query_organizationsconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed5(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2109,6 +2325,35 @@ function assertAllowed5(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Query_organizationsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed5(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Query_projectsfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Query_projectslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Query_projectsoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Query_projectsbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Query_projectsafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Query_projectsorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); + return null; +} +const Query_projectsconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed6(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2121,6 +2366,35 @@ function assertAllowed6(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Query_projectsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed6(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Query_postsfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Query_postslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Query_postsoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Query_postsbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Query_postsafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Query_postsorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + return null; +} +const Query_postsconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed7(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2133,6 +2407,35 @@ function assertAllowed7(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Query_postsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed7(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Query_postStatusesfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Query_postStatuseslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Query_postStatusesoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Query_postStatusesbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Query_postStatusesafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Query_postStatusesorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); + return null; +} +const Query_postStatusesconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed8(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2145,6 +2448,35 @@ function assertAllowed8(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Query_postStatusesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed8(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Query_usersfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Query_userslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Query_usersoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Query_usersbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Query_usersafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Query_usersorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); + return null; +} +const Query_usersconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed9(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2157,6 +2489,35 @@ function assertAllowed9(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Query_usersfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed9(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Query_membersfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Query_memberslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Query_membersoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Query_membersbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Query_membersafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Query_membersorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + return null; +} +const Query_membersconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed10(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2169,6 +2530,11 @@ function assertAllowed10(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Query_membersfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed10(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} function UUIDSerialize(value) { return "" + value; } @@ -2176,6 +2542,30 @@ const coerce = string => { if (!/^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$/i.test(string)) throw new GraphQLError("Invalid UUID, expected 32 hexadecimal characters, optionally with hypens"); return string; }; +function Post_upvotesfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Post_upvoteslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Post_upvotesoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Post_upvotesbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Post_upvotesafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Post_upvotesorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); + return null; +} +const Post_upvotesconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed11(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2188,6 +2578,35 @@ function assertAllowed11(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Post_upvotesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed11(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Post_commentsfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Post_commentslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Post_commentsoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Post_commentsbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Post_commentsafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Post_commentsorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); + return null; +} +const Post_commentsconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed12(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2200,6 +2619,35 @@ function assertAllowed12(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Post_commentsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed12(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Post_downvotesfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Post_downvoteslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Post_downvotesoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Post_downvotesbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Post_downvotesafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Post_downvotesorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); + return null; +} +const Post_downvotesconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed13(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2212,6 +2660,35 @@ function assertAllowed13(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Post_downvotesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed13(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Project_postsfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Project_postslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Project_postsoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Project_postsbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Project_postsafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Project_postsorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + return null; +} +const Project_postsconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed14(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2224,6 +2701,35 @@ function assertAllowed14(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Project_postsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed14(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Project_postStatusesfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Project_postStatuseslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Project_postStatusesoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Project_postStatusesbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Project_postStatusesafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Project_postStatusesorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); + return null; +} +const Project_postStatusesconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed15(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2236,6 +2742,35 @@ function assertAllowed15(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Project_postStatusesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed15(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Organization_projectsfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Organization_projectslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Organization_projectsoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Organization_projectsbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Organization_projectsafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Organization_projectsorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); + return null; +} +const Organization_projectsconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed16(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2248,6 +2783,35 @@ function assertAllowed16(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Organization_projectsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed16(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Organization_membersfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Organization_memberslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Organization_membersoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Organization_membersbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Organization_membersafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Organization_membersorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + return null; +} +const Organization_membersconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed17(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2260,6 +2824,35 @@ function assertAllowed17(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Organization_membersfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed17(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function Organization_invitationsfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function Organization_invitationslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function Organization_invitationsoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function Organization_invitationsbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function Organization_invitationsafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function Organization_invitationsorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); + return null; +} +const Organization_invitationsconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed18(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2272,6 +2865,11 @@ function assertAllowed18(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function Organization_invitationsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed18(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} function ProjectGroupBy_extensions_grafast_applyPlan($pgSelect) { $pgSelect.groupBy({ fragment: sql.fragment`${$pgSelect.alias}.${sql.identifier("name")}` @@ -2348,97 +2946,123 @@ function ProjectGroupBy_extensions_grafast_applyPlan11($pgSelect) { export const ProjectGroupBy = new GraphQLEnumType({ name: "ProjectGroupBy", description: "Grouping methods for `Project` for usage during aggregation.", - values: Object.assign(Object.create(null), { + values: { + __proto__: null, NAME: { value: "NAME", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan } - }) + } }, IMAGE: { value: "IMAGE", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan2 } - }) + } }, DESCRIPTION: { value: "DESCRIPTION", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan3 } - }) + } }, ORGANIZATION_ID: { value: "ORGANIZATION_ID", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan4 } - }) + } }, CREATED_AT: { value: "CREATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan5 } - }) + } }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan6 } - }) + } }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan7 } - }) + } }, UPDATED_AT: { value: "UPDATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan8 } - }) + } }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan9 } - }) + } }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan10 } - }) + } }, SLUG: { value: "SLUG", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan11 } - }) + } } - }) + } }); +function ProjectConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(ProjectGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; +} +function ProjectConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); +} const dataTypeToAggregateTypeMap = {}; const spec = { id: "distinctCount", @@ -4042,57 +4666,102 @@ function MemberGroupBy_extensions_grafast_applyPlan6($pgSelect) { export const MemberGroupBy = new GraphQLEnumType({ name: "MemberGroupBy", description: "Grouping methods for `Member` for usage during aggregation.", - values: Object.assign(Object.create(null), { + values: { + __proto__: null, USER_ID: { value: "USER_ID", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: MemberGroupBy_extensions_grafast_applyPlan } - }) + } }, ORGANIZATION_ID: { value: "ORGANIZATION_ID", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: MemberGroupBy_extensions_grafast_applyPlan2 } - }) + } }, CREATED_AT: { value: "CREATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: MemberGroupBy_extensions_grafast_applyPlan3 } - }) + } }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: MemberGroupBy_extensions_grafast_applyPlan4 } - }) + } }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: MemberGroupBy_extensions_grafast_applyPlan5 } - }) + } }, ROLE: { value: "ROLE", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: MemberGroupBy_extensions_grafast_applyPlan6 } - }) + } } - }) + } }); +function MemberConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(MemberGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; +} +function MemberConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); +} +function User_postsfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function User_postslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function User_postsoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function User_postsbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function User_postsafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function User_postsorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + return null; +} +const User_postsconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed56(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -4105,6 +4774,35 @@ function assertAllowed56(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function User_postsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed56(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function User_upvotesfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function User_upvoteslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function User_upvotesoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function User_upvotesbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function User_upvotesafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function User_upvotesorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); + return null; +} +const User_upvotesconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed57(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -4117,6 +4815,35 @@ function assertAllowed57(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function User_upvotesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed57(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function User_membersfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function User_memberslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function User_membersoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function User_membersbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function User_membersafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function User_membersorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + return null; +} +const User_membersconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed58(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -4129,6 +4856,35 @@ function assertAllowed58(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function User_membersfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed58(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function User_commentsfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function User_commentslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function User_commentsoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function User_commentsbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function User_commentsafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function User_commentsorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); + return null; +} +const User_commentsconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed59(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -4141,6 +4897,35 @@ function assertAllowed59(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function User_commentsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed59(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} +function User_downvotesfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function User_downvoteslastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function User_downvotesoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function User_downvotesbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function User_downvotesafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function User_downvotesorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); + return null; +} +const User_downvotesconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed60(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -4153,6 +4938,11 @@ function assertAllowed60(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function User_downvotesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed60(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} function PostGroupBy_extensions_grafast_applyPlan($pgSelect) { $pgSelect.groupBy({ fragment: sql.fragment`${$pgSelect.alias}.${sql.identifier("title")}` @@ -4226,121 +5016,150 @@ function PostGroupBy_extensions_grafast_applyPlan14($pgSelect) { export const PostGroupBy = new GraphQLEnumType({ name: "PostGroupBy", description: "Grouping methods for `Post` for usage during aggregation.", - values: Object.assign(Object.create(null), { + values: { + __proto__: null, TITLE: { value: "TITLE", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan } - }) + } }, DESCRIPTION: { value: "DESCRIPTION", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan2 } - }) + } }, PROJECT_ID: { value: "PROJECT_ID", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan3 } - }) + } }, USER_ID: { value: "USER_ID", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan4 } - }) + } }, CREATED_AT: { value: "CREATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan5 } - }) + } }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan6 } - }) + } }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan7 } - }) + } }, UPDATED_AT: { value: "UPDATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan8 } - }) + } }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan9 } - }) + } }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan10 } - }) + } }, STATUS_ID: { value: "STATUS_ID", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan11 } - }) + } }, STATUS_UPDATED_AT: { value: "STATUS_UPDATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan12 } - }) + } }, STATUS_UPDATED_AT_TRUNCATED_TO_HOUR: { value: "STATUS_UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan13 } - }) + } }, STATUS_UPDATED_AT_TRUNCATED_TO_DAY: { value: "STATUS_UPDATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan14 } - }) + } } - }) + } }); +function PostConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(PostGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; +} +function PostConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); +} const relation3 = registry.pgRelations["post"]["upvotesByTheirPostId"]; const relation4 = registry.pgRelations["post"]["commentsByTheirPostId"]; const relation5 = registry.pgRelations["post"]["downvotesByTheirPostId"]; @@ -4387,73 +5206,96 @@ function UpvoteGroupBy_extensions_grafast_applyPlan8($pgSelect) { export const UpvoteGroupBy = new GraphQLEnumType({ name: "UpvoteGroupBy", description: "Grouping methods for `Upvote` for usage during aggregation.", - values: Object.assign(Object.create(null), { + values: { + __proto__: null, POST_ID: { value: "POST_ID", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan } - }) + } }, USER_ID: { value: "USER_ID", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan2 } - }) + } }, CREATED_AT: { value: "CREATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan3 } - }) + } }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan4 } - }) + } }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan5 } - }) + } }, UPDATED_AT: { value: "UPDATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan6 } - }) + } }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan7 } - }) + } }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan8 } - }) + } } - }) + } }); +function UpvoteConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(UpvoteGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; +} +function UpvoteConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); +} function CommentGroupBy_extensions_grafast_applyPlan($pgSelect) { $pgSelect.groupBy({ fragment: sql.fragment`${$pgSelect.alias}.${sql.identifier("message")}` @@ -4502,81 +5344,105 @@ function CommentGroupBy_extensions_grafast_applyPlan9($pgSelect) { export const CommentGroupBy = new GraphQLEnumType({ name: "CommentGroupBy", description: "Grouping methods for `Comment` for usage during aggregation.", - values: Object.assign(Object.create(null), { + values: { + __proto__: null, MESSAGE: { value: "MESSAGE", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan } - }) + } }, POST_ID: { value: "POST_ID", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan2 } - }) + } }, USER_ID: { value: "USER_ID", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan3 } - }) + } }, CREATED_AT: { value: "CREATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan4 } - }) + } }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan5 } - }) + } }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan6 } - }) + } }, UPDATED_AT: { value: "UPDATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan7 } - }) + } }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan8 } - }) + } }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan9 } - }) + } } - }) + } }); +function CommentConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(CommentGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; +} +function CommentConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); +} function DownvoteGroupBy_extensions_grafast_applyPlan($pgSelect) { $pgSelect.groupBy({ fragment: sql.fragment`${$pgSelect.alias}.${sql.identifier("post_id")}` @@ -4620,73 +5486,96 @@ function DownvoteGroupBy_extensions_grafast_applyPlan8($pgSelect) { export const DownvoteGroupBy = new GraphQLEnumType({ name: "DownvoteGroupBy", description: "Grouping methods for `Downvote` for usage during aggregation.", - values: Object.assign(Object.create(null), { + values: { + __proto__: null, POST_ID: { value: "POST_ID", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan } - }) + } }, USER_ID: { value: "USER_ID", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan2 } - }) + } }, CREATED_AT: { value: "CREATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan3 } - }) + } }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan4 } - }) + } }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan5 } - }) + } }, UPDATED_AT: { value: "UPDATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan6 } - }) + } }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan7 } - }) + } }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan8 } - }) + } } - }) + } }); +function DownvoteConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(DownvoteGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; +} +function DownvoteConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); +} function InvitationGroupBy_extensions_grafast_applyPlan($pgSelect) { $pgSelect.groupBy({ fragment: sql.fragment`${$pgSelect.alias}.${sql.identifier("organization_id")}` @@ -4725,65 +5614,87 @@ function InvitationGroupBy_extensions_grafast_applyPlan7($pgSelect) { export const InvitationGroupBy = new GraphQLEnumType({ name: "InvitationGroupBy", description: "Grouping methods for `Invitation` for usage during aggregation.", - values: Object.assign(Object.create(null), { + values: { + __proto__: null, ORGANIZATION_ID: { value: "ORGANIZATION_ID", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: InvitationGroupBy_extensions_grafast_applyPlan } - }) + } }, CREATED_AT: { value: "CREATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: InvitationGroupBy_extensions_grafast_applyPlan2 } - }) + } }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: InvitationGroupBy_extensions_grafast_applyPlan3 } - }) + } }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: InvitationGroupBy_extensions_grafast_applyPlan4 } - }) + } }, UPDATED_AT: { value: "UPDATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: InvitationGroupBy_extensions_grafast_applyPlan5 } - }) + } }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: InvitationGroupBy_extensions_grafast_applyPlan6 } - }) + } }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: InvitationGroupBy_extensions_grafast_applyPlan7 } - }) + } } - }) + } }); +function InvitationConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(InvitationGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; +} +function InvitationConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); +} function PostStatusGroupBy_extensions_grafast_applyPlan($pgSelect) { $pgSelect.groupBy({ fragment: sql.fragment`${$pgSelect.alias}.${sql.identifier("status")}` @@ -4842,97 +5753,147 @@ function PostStatusGroupBy_extensions_grafast_applyPlan11($pgSelect) { export const PostStatusGroupBy = new GraphQLEnumType({ name: "PostStatusGroupBy", description: "Grouping methods for `PostStatus` for usage during aggregation.", - values: Object.assign(Object.create(null), { + values: { + __proto__: null, STATUS: { value: "STATUS", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan } - }) + } }, DESCRIPTION: { value: "DESCRIPTION", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan2 } - }) + } }, COLOR: { value: "COLOR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan3 } - }) + } }, PROJECT_ID: { value: "PROJECT_ID", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan4 } - }) + } }, IS_DEFAULT: { value: "IS_DEFAULT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan5 } - }) + } }, CREATED_AT: { value: "CREATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan6 } - }) + } }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan7 } - }) + } }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan8 } - }) + } }, UPDATED_AT: { value: "UPDATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan9 } - }) + } }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan10 } - }) + } }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan11 } - }) + } } - }) + } }); +function PostStatusConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(PostStatusGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; +} +function PostStatusConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); +} +function PostStatus_postsByStatusIdfirstautoApplyAfterParentPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); +} +function PostStatus_postsByStatusIdlastautoApplyAfterParentPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); +} +function PostStatus_postsByStatusIdoffsetautoApplyAfterParentPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); +} +function PostStatus_postsByStatusIdbeforeautoApplyAfterParentPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); +} +function PostStatus_postsByStatusIdafterautoApplyAfterParentPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); +} +function PostStatus_postsByStatusIdorderByautoApplyAfterParentPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + return null; +} +const PostStatus_postsByStatusIdconditionautoApplyAfterParentPlan = (_condition, $connection) => { + return $connection.getSubplan().wherePlan(); +}; function assertAllowed61(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -4945,6 +5906,11 @@ function assertAllowed61(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } +function PostStatus_postsByStatusIdfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { + assertAllowed61(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + fieldArgs.apply($where); +} const relation6 = registry.pgRelations["postStatus"]["postsByTheirStatusId"]; function OrganizationGroupBy_extensions_grafast_applyPlan($pgSelect) { $pgSelect.groupBy({ @@ -4984,65 +5950,87 @@ function OrganizationGroupBy_extensions_grafast_applyPlan7($pgSelect) { export const OrganizationGroupBy = new GraphQLEnumType({ name: "OrganizationGroupBy", description: "Grouping methods for `Organization` for usage during aggregation.", - values: Object.assign(Object.create(null), { + values: { + __proto__: null, CREATED_AT: { value: "CREATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: OrganizationGroupBy_extensions_grafast_applyPlan } - }) + } }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: OrganizationGroupBy_extensions_grafast_applyPlan2 } - }) + } }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: OrganizationGroupBy_extensions_grafast_applyPlan3 } - }) + } }, UPDATED_AT: { value: "UPDATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: OrganizationGroupBy_extensions_grafast_applyPlan4 } - }) + } }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: OrganizationGroupBy_extensions_grafast_applyPlan5 } - }) + } }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: OrganizationGroupBy_extensions_grafast_applyPlan6 } - }) + } }, SLUG: { value: "SLUG", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: OrganizationGroupBy_extensions_grafast_applyPlan7 } - }) + } } - }) + } }); +function OrganizationConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(OrganizationGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; +} +function OrganizationConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); +} const relation7 = registry.pgRelations["organization"]["projectsByTheirOrganizationId"]; const relation8 = registry.pgRelations["organization"]["membersByTheirOrganizationId"]; const relation9 = registry.pgRelations["organization"]["invitationsByTheirOrganizationId"]; @@ -5089,78 +6077,116 @@ function UserGroupBy_extensions_grafast_applyPlan8($pgSelect) { export const UserGroupBy = new GraphQLEnumType({ name: "UserGroupBy", description: "Grouping methods for `User` for usage during aggregation.", - values: Object.assign(Object.create(null), { + values: { + __proto__: null, CREATED_AT: { value: "CREATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan } - }) + } }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan2 } - }) + } }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan3 } - }) + } }, UPDATED_AT: { value: "UPDATED_AT", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan4 } - }) + } }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan5 } - }) + } }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan6 } - }) + } }, FIRST_NAME: { value: "FIRST_NAME", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan7 } - }) + } }, LAST_NAME: { value: "LAST_NAME", - extensions: Object.assign(Object.create(null), { + extensions: { + __proto__: null, grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan8 } - }) + } } - }) + } }); +function UserConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(UserGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; +} +function UserConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); +} const relation10 = registry.pgRelations["user"]["postsByTheirUserId"]; const relation11 = registry.pgRelations["user"]["upvotesByTheirUserId"]; const relation12 = registry.pgRelations["user"]["membersByTheirUserId"]; const relation13 = registry.pgRelations["user"]["commentsByTheirUserId"]; const relation14 = registry.pgRelations["user"]["downvotesByTheirUserId"]; +function Mutation_createDownvoteinputautoApplyAfterParentPlan(_, $object) { + return $object; +} +function Mutation_createInvitationinputautoApplyAfterParentPlan(_, $object) { + return $object; +} +function Mutation_createUpvoteinputautoApplyAfterParentPlan(_, $object) { + return $object; +} +function Mutation_createCommentinputautoApplyAfterParentPlan(_, $object) { + return $object; +} +function Mutation_createOrganizationinputautoApplyAfterParentPlan(_, $object) { + return $object; +} function oldPlan(_, args) { const plan = object({ result: pgInsertSingle(resource_projectPgResource, Object.create(null)) @@ -5190,6 +6216,12 @@ const planWrapper = (plan, _, fieldArgs) => { }); return plan(); }; +function Mutation_createProjectinputautoApplyAfterParentPlan(_, $object) { + return $object; +} +function Mutation_createPostinputautoApplyAfterParentPlan(_, $object) { + return $object; +} function oldPlan2(_, args) { const plan = object({ result: pgInsertSingle(resource_post_statusPgResource, Object.create(null)) @@ -5223,6 +6255,12 @@ const planWrapper2 = (plan, _, fieldArgs) => { }); return plan(); }; +function Mutation_createPostStatusinputautoApplyAfterParentPlan(_, $object) { + return $object; +} +function Mutation_createUserinputautoApplyAfterParentPlan(_, $object) { + return $object; +} function oldPlan3(_, args) { const plan = object({ result: pgInsertSingle(resource_memberPgResource, Object.create(null)) @@ -5264,6 +6302,9 @@ const planWrapper3 = (plan, _, fieldArgs) => { }); return plan(); }; +function Mutation_createMemberinputautoApplyAfterParentPlan(_, $object) { + return $object; +} const oldPlan4 = (_$root, args) => { const plan = object({ result: pgUpdateSingle(resource_downvotePgResource, { @@ -10739,7 +11780,7 @@ input OrganizationInput { name: String! createdAt: Datetime updatedAt: Datetime - slug: String + slug: String! } """The output of our create \`Project\` mutation.""" @@ -11816,208 +12857,105 @@ export const plans = { const specifier = handler.plan($parent); return lambda(specifier, nodeIdCodecs[handler.codec.name].encode); }, - node: { - plan(_$root, args) { - return node(nodeIdHandlerByTypeName, args.get("id")); - }, - args: { - id: undefined - } + node(_$root, args) { + return node(nodeIdHandlerByTypeName, args.get("id")); }, - downvote: { - plan(_$root, args) { - return resource_downvotePgResource.get({ - id: args.get("rowId") - }); - }, - args: { - rowId: undefined - } + downvote(_$root, args) { + return resource_downvotePgResource.get({ + id: args.get("rowId") + }); }, - downvoteByPostIdAndUserId: { - plan(_$root, args) { - return resource_downvotePgResource.get({ - post_id: args.get("postId"), - user_id: args.get("userId") - }); - }, - args: { - postId: undefined, - userId: undefined - } + downvoteByPostIdAndUserId(_$root, args) { + return resource_downvotePgResource.get({ + post_id: args.get("postId"), + user_id: args.get("userId") + }); }, - invitation: { - plan(_$root, args) { - return resource_invitationPgResource.get({ - id: args.get("rowId") - }); - }, - args: { - rowId: undefined - } + invitation(_$root, args) { + return resource_invitationPgResource.get({ + id: args.get("rowId") + }); }, - invitationByEmail: { - plan(_$root, args) { - return resource_invitationPgResource.get({ - email: args.get("email") - }); - }, - args: { - email: undefined - } + invitationByEmail(_$root, args) { + return resource_invitationPgResource.get({ + email: args.get("email") + }); }, - upvote: { - plan(_$root, args) { - return resource_upvotePgResource.get({ - id: args.get("rowId") - }); - }, - args: { - rowId: undefined - } + upvote(_$root, args) { + return resource_upvotePgResource.get({ + id: args.get("rowId") + }); }, - upvoteByPostIdAndUserId: { - plan(_$root, args) { - return resource_upvotePgResource.get({ - post_id: args.get("postId"), - user_id: args.get("userId") - }); - }, - args: { - postId: undefined, - userId: undefined - } + upvoteByPostIdAndUserId(_$root, args) { + return resource_upvotePgResource.get({ + post_id: args.get("postId"), + user_id: args.get("userId") + }); }, - comment: { - plan(_$root, args) { - return resource_commentPgResource.get({ - id: args.get("rowId") - }); - }, - args: { - rowId: undefined - } + comment(_$root, args) { + return resource_commentPgResource.get({ + id: args.get("rowId") + }); }, - organization: { - plan(_$root, args) { - return resource_organizationPgResource.get({ - id: args.get("rowId") - }); - }, - args: { - rowId: undefined - } + organization(_$root, args) { + return resource_organizationPgResource.get({ + id: args.get("rowId") + }); }, - organizationByName: { - plan(_$root, args) { - return resource_organizationPgResource.get({ - name: args.get("name") - }); - }, - args: { - name: undefined - } + organizationByName(_$root, args) { + return resource_organizationPgResource.get({ + name: args.get("name") + }); }, - project: { - plan(_$root, args) { - return resource_projectPgResource.get({ - id: args.get("rowId") - }); - }, - args: { - rowId: undefined - } + project(_$root, args) { + return resource_projectPgResource.get({ + id: args.get("rowId") + }); }, - post: { - plan(_$root, args) { - return resource_postPgResource.get({ - id: args.get("rowId") - }); - }, - args: { - rowId: undefined - } + post(_$root, args) { + return resource_postPgResource.get({ + id: args.get("rowId") + }); }, - postStatus: { - plan(_$root, args) { - return resource_post_statusPgResource.get({ - id: args.get("rowId") - }); - }, - args: { - rowId: undefined - } + postStatus(_$root, args) { + return resource_post_statusPgResource.get({ + id: args.get("rowId") + }); }, - user: { - plan(_$root, args) { - return resource_userPgResource.get({ - id: args.get("rowId") - }); - }, - args: { - rowId: undefined - } + user(_$root, args) { + return resource_userPgResource.get({ + id: args.get("rowId") + }); }, - userByEmail: { - plan(_$root, args) { - return resource_userPgResource.get({ - email: args.get("email") - }); - }, - args: { - email: undefined - } + userByEmail(_$root, args) { + return resource_userPgResource.get({ + email: args.get("email") + }); }, - userByHidraId: { - plan(_$root, args) { - return resource_userPgResource.get({ - hidra_id: args.get("hidraId") - }); - }, - args: { - hidraId: undefined - } + userByHidraId(_$root, args) { + return resource_userPgResource.get({ + hidra_id: args.get("hidraId") + }); }, - userByUsername: { - plan(_$root, args) { - return resource_userPgResource.get({ - username: args.get("username") - }); - }, - args: { - username: undefined - } + userByUsername(_$root, args) { + return resource_userPgResource.get({ + username: args.get("username") + }); }, - member: { - plan(_$root, args) { - return resource_memberPgResource.get({ - id: args.get("rowId") - }); - }, - args: { - rowId: undefined - } + member(_$root, args) { + return resource_memberPgResource.get({ + id: args.get("rowId") + }); }, - memberByUserIdAndOrganizationId: { - plan(_$root, args) { - return resource_memberPgResource.get({ - user_id: args.get("userId"), - organization_id: args.get("organizationId") - }); - }, - args: { - userId: undefined, - organizationId: undefined - } + memberByUserIdAndOrganizationId(_$root, args) { + return resource_memberPgResource.get({ + user_id: args.get("userId"), + organization_id: args.get("organizationId") + }); }, - fUnaccent: { - plan($root, args, _info) { - const selectArgs = makeArgs(args); - return resource_f_unaccentPgResource.execute(selectArgs); - }, - args: { - arg0: undefined - } + fUnaccent($root, args, _info) { + const selectArgs = makeArgs(args); + return resource_f_unaccentPgResource.execute(selectArgs); }, downvotes: { plan() { @@ -12025,60 +12963,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Query_downvotesfirstautoApplyAfterParentPlan, + applyPlan: Query_downvotesfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Query_downvoteslastautoApplyAfterParentPlan, + applyPlan: Query_downvoteslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Query_downvotesoffsetautoApplyAfterParentPlan, + applyPlan: Query_downvotesoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Query_downvotesbeforeautoApplyAfterParentPlan, + applyPlan: Query_downvotesbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Query_downvotesafterautoApplyAfterParentPlan, + applyPlan: Query_downvotesafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); - return null; - } + autoApplyAfterParentPlan: Query_downvotesorderByautoApplyAfterParentPlan, + applyPlan: Query_downvotesorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Query_downvotesconditionautoApplyAfterParentPlan, + applyPlan: Query_downvotesconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Query_downvotesfilterautoApplyAfterParentPlan, + applyPlan: Query_downvotesfilterautoApplyAfterParentPlan } } }, @@ -12088,60 +13002,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Query_invitationsfirstautoApplyAfterParentPlan, + applyPlan: Query_invitationsfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Query_invitationslastautoApplyAfterParentPlan, + applyPlan: Query_invitationslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Query_invitationsoffsetautoApplyAfterParentPlan, + applyPlan: Query_invitationsoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Query_invitationsbeforeautoApplyAfterParentPlan, + applyPlan: Query_invitationsbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Query_invitationsafterautoApplyAfterParentPlan, + applyPlan: Query_invitationsafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); - return null; - } + autoApplyAfterParentPlan: Query_invitationsorderByautoApplyAfterParentPlan, + applyPlan: Query_invitationsorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Query_invitationsconditionautoApplyAfterParentPlan, + applyPlan: Query_invitationsconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed2(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Query_invitationsfilterautoApplyAfterParentPlan, + applyPlan: Query_invitationsfilterautoApplyAfterParentPlan } } }, @@ -12151,60 +13041,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Query_upvotesfirstautoApplyAfterParentPlan, + applyPlan: Query_upvotesfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Query_upvoteslastautoApplyAfterParentPlan, + applyPlan: Query_upvoteslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Query_upvotesoffsetautoApplyAfterParentPlan, + applyPlan: Query_upvotesoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Query_upvotesbeforeautoApplyAfterParentPlan, + applyPlan: Query_upvotesbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Query_upvotesafterautoApplyAfterParentPlan, + applyPlan: Query_upvotesafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); - return null; - } + autoApplyAfterParentPlan: Query_upvotesorderByautoApplyAfterParentPlan, + applyPlan: Query_upvotesorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Query_upvotesconditionautoApplyAfterParentPlan, + applyPlan: Query_upvotesconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed3(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Query_upvotesfilterautoApplyAfterParentPlan, + applyPlan: Query_upvotesfilterautoApplyAfterParentPlan } } }, @@ -12214,60 +13080,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Query_commentsfirstautoApplyAfterParentPlan, + applyPlan: Query_commentsfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Query_commentslastautoApplyAfterParentPlan, + applyPlan: Query_commentslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Query_commentsoffsetautoApplyAfterParentPlan, + applyPlan: Query_commentsoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Query_commentsbeforeautoApplyAfterParentPlan, + applyPlan: Query_commentsbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Query_commentsafterautoApplyAfterParentPlan, + applyPlan: Query_commentsafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); - return null; - } + autoApplyAfterParentPlan: Query_commentsorderByautoApplyAfterParentPlan, + applyPlan: Query_commentsorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Query_commentsconditionautoApplyAfterParentPlan, + applyPlan: Query_commentsconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed4(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Query_commentsfilterautoApplyAfterParentPlan, + applyPlan: Query_commentsfilterautoApplyAfterParentPlan } } }, @@ -12277,60 +13119,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Query_organizationsfirstautoApplyAfterParentPlan, + applyPlan: Query_organizationsfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Query_organizationslastautoApplyAfterParentPlan, + applyPlan: Query_organizationslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Query_organizationsoffsetautoApplyAfterParentPlan, + applyPlan: Query_organizationsoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Query_organizationsbeforeautoApplyAfterParentPlan, + applyPlan: Query_organizationsbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Query_organizationsafterautoApplyAfterParentPlan, + applyPlan: Query_organizationsafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); - return null; - } + autoApplyAfterParentPlan: Query_organizationsorderByautoApplyAfterParentPlan, + applyPlan: Query_organizationsorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Query_organizationsconditionautoApplyAfterParentPlan, + applyPlan: Query_organizationsconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed5(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Query_organizationsfilterautoApplyAfterParentPlan, + applyPlan: Query_organizationsfilterautoApplyAfterParentPlan } } }, @@ -12340,60 +13158,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Query_projectsfirstautoApplyAfterParentPlan, + applyPlan: Query_projectsfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Query_projectslastautoApplyAfterParentPlan, + applyPlan: Query_projectslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Query_projectsoffsetautoApplyAfterParentPlan, + applyPlan: Query_projectsoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Query_projectsbeforeautoApplyAfterParentPlan, + applyPlan: Query_projectsbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Query_projectsafterautoApplyAfterParentPlan, + applyPlan: Query_projectsafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); - return null; - } + autoApplyAfterParentPlan: Query_projectsorderByautoApplyAfterParentPlan, + applyPlan: Query_projectsorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Query_projectsconditionautoApplyAfterParentPlan, + applyPlan: Query_projectsconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed6(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Query_projectsfilterautoApplyAfterParentPlan, + applyPlan: Query_projectsfilterautoApplyAfterParentPlan } } }, @@ -12403,60 +13197,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Query_postsfirstautoApplyAfterParentPlan, + applyPlan: Query_postsfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Query_postslastautoApplyAfterParentPlan, + applyPlan: Query_postslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Query_postsoffsetautoApplyAfterParentPlan, + applyPlan: Query_postsoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Query_postsbeforeautoApplyAfterParentPlan, + applyPlan: Query_postsbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Query_postsafterautoApplyAfterParentPlan, + applyPlan: Query_postsafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); - return null; - } + autoApplyAfterParentPlan: Query_postsorderByautoApplyAfterParentPlan, + applyPlan: Query_postsorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Query_postsconditionautoApplyAfterParentPlan, + applyPlan: Query_postsconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed7(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Query_postsfilterautoApplyAfterParentPlan, + applyPlan: Query_postsfilterautoApplyAfterParentPlan } } }, @@ -12466,60 +13236,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Query_postStatusesfirstautoApplyAfterParentPlan, + applyPlan: Query_postStatusesfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Query_postStatuseslastautoApplyAfterParentPlan, + applyPlan: Query_postStatuseslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Query_postStatusesoffsetautoApplyAfterParentPlan, + applyPlan: Query_postStatusesoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Query_postStatusesbeforeautoApplyAfterParentPlan, + applyPlan: Query_postStatusesbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Query_postStatusesafterautoApplyAfterParentPlan, + applyPlan: Query_postStatusesafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); - return null; - } + autoApplyAfterParentPlan: Query_postStatusesorderByautoApplyAfterParentPlan, + applyPlan: Query_postStatusesorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Query_postStatusesconditionautoApplyAfterParentPlan, + applyPlan: Query_postStatusesconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed8(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Query_postStatusesfilterautoApplyAfterParentPlan, + applyPlan: Query_postStatusesfilterautoApplyAfterParentPlan } } }, @@ -12529,60 +13275,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Query_usersfirstautoApplyAfterParentPlan, + applyPlan: Query_usersfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Query_userslastautoApplyAfterParentPlan, + applyPlan: Query_userslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Query_usersoffsetautoApplyAfterParentPlan, + applyPlan: Query_usersoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Query_usersbeforeautoApplyAfterParentPlan, + applyPlan: Query_usersbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Query_usersafterautoApplyAfterParentPlan, + applyPlan: Query_usersafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); - return null; - } + autoApplyAfterParentPlan: Query_usersorderByautoApplyAfterParentPlan, + applyPlan: Query_usersorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Query_usersconditionautoApplyAfterParentPlan, + applyPlan: Query_usersconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed9(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Query_usersfilterautoApplyAfterParentPlan, + applyPlan: Query_usersfilterautoApplyAfterParentPlan } } }, @@ -12592,60 +13314,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Query_membersfirstautoApplyAfterParentPlan, + applyPlan: Query_membersfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Query_memberslastautoApplyAfterParentPlan, + applyPlan: Query_memberslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Query_membersoffsetautoApplyAfterParentPlan, + applyPlan: Query_membersoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Query_membersbeforeautoApplyAfterParentPlan, + applyPlan: Query_membersbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Query_membersafterautoApplyAfterParentPlan, + applyPlan: Query_membersafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); - return null; - } + autoApplyAfterParentPlan: Query_membersorderByautoApplyAfterParentPlan, + applyPlan: Query_membersorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Query_membersconditionautoApplyAfterParentPlan, + applyPlan: Query_membersconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed10(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Query_membersfilterautoApplyAfterParentPlan, + applyPlan: Query_membersfilterautoApplyAfterParentPlan } } } @@ -12749,60 +13447,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Post_upvotesfirstautoApplyAfterParentPlan, + applyPlan: Post_upvotesfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Post_upvoteslastautoApplyAfterParentPlan, + applyPlan: Post_upvoteslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Post_upvotesoffsetautoApplyAfterParentPlan, + applyPlan: Post_upvotesoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Post_upvotesbeforeautoApplyAfterParentPlan, + applyPlan: Post_upvotesbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Post_upvotesafterautoApplyAfterParentPlan, + applyPlan: Post_upvotesafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); - return null; - } + autoApplyAfterParentPlan: Post_upvotesorderByautoApplyAfterParentPlan, + applyPlan: Post_upvotesorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Post_upvotesconditionautoApplyAfterParentPlan, + applyPlan: Post_upvotesconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed11(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Post_upvotesfilterautoApplyAfterParentPlan, + applyPlan: Post_upvotesfilterautoApplyAfterParentPlan } } }, @@ -12815,60 +13489,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Post_commentsfirstautoApplyAfterParentPlan, + applyPlan: Post_commentsfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Post_commentslastautoApplyAfterParentPlan, + applyPlan: Post_commentslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Post_commentsoffsetautoApplyAfterParentPlan, + applyPlan: Post_commentsoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Post_commentsbeforeautoApplyAfterParentPlan, + applyPlan: Post_commentsbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Post_commentsafterautoApplyAfterParentPlan, + applyPlan: Post_commentsafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); - return null; - } + autoApplyAfterParentPlan: Post_commentsorderByautoApplyAfterParentPlan, + applyPlan: Post_commentsorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Post_commentsconditionautoApplyAfterParentPlan, + applyPlan: Post_commentsconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed12(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Post_commentsfilterautoApplyAfterParentPlan, + applyPlan: Post_commentsfilterautoApplyAfterParentPlan } } }, @@ -12881,60 +13531,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Post_downvotesfirstautoApplyAfterParentPlan, + applyPlan: Post_downvotesfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Post_downvoteslastautoApplyAfterParentPlan, + applyPlan: Post_downvoteslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Post_downvotesoffsetautoApplyAfterParentPlan, + applyPlan: Post_downvotesoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Post_downvotesbeforeautoApplyAfterParentPlan, + applyPlan: Post_downvotesbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Post_downvotesafterautoApplyAfterParentPlan, + applyPlan: Post_downvotesafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); - return null; - } + autoApplyAfterParentPlan: Post_downvotesorderByautoApplyAfterParentPlan, + applyPlan: Post_downvotesorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Post_downvotesconditionautoApplyAfterParentPlan, + applyPlan: Post_downvotesconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed13(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Post_downvotesfilterautoApplyAfterParentPlan, + applyPlan: Post_downvotesfilterautoApplyAfterParentPlan } } } @@ -12979,60 +13605,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Project_postsfirstautoApplyAfterParentPlan, + applyPlan: Project_postsfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Project_postslastautoApplyAfterParentPlan, + applyPlan: Project_postslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Project_postsoffsetautoApplyAfterParentPlan, + applyPlan: Project_postsoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Project_postsbeforeautoApplyAfterParentPlan, + applyPlan: Project_postsbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Project_postsafterautoApplyAfterParentPlan, + applyPlan: Project_postsafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); - return null; - } + autoApplyAfterParentPlan: Project_postsorderByautoApplyAfterParentPlan, + applyPlan: Project_postsorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Project_postsconditionautoApplyAfterParentPlan, + applyPlan: Project_postsconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed14(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Project_postsfilterautoApplyAfterParentPlan, + applyPlan: Project_postsfilterautoApplyAfterParentPlan } } }, @@ -13045,60 +13647,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Project_postStatusesfirstautoApplyAfterParentPlan, + applyPlan: Project_postStatusesfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Project_postStatuseslastautoApplyAfterParentPlan, + applyPlan: Project_postStatuseslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Project_postStatusesoffsetautoApplyAfterParentPlan, + applyPlan: Project_postStatusesoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Project_postStatusesbeforeautoApplyAfterParentPlan, + applyPlan: Project_postStatusesbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Project_postStatusesafterautoApplyAfterParentPlan, + applyPlan: Project_postStatusesafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); - return null; - } + autoApplyAfterParentPlan: Project_postStatusesorderByautoApplyAfterParentPlan, + applyPlan: Project_postStatusesorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Project_postStatusesconditionautoApplyAfterParentPlan, + applyPlan: Project_postStatusesconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed15(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Project_postStatusesfilterautoApplyAfterParentPlan, + applyPlan: Project_postStatusesfilterautoApplyAfterParentPlan } } } @@ -13129,60 +13707,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Organization_projectsfirstautoApplyAfterParentPlan, + applyPlan: Organization_projectsfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Organization_projectslastautoApplyAfterParentPlan, + applyPlan: Organization_projectslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Organization_projectsoffsetautoApplyAfterParentPlan, + applyPlan: Organization_projectsoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Organization_projectsbeforeautoApplyAfterParentPlan, + applyPlan: Organization_projectsbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Organization_projectsafterautoApplyAfterParentPlan, + applyPlan: Organization_projectsafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); - return null; - } + autoApplyAfterParentPlan: Organization_projectsorderByautoApplyAfterParentPlan, + applyPlan: Organization_projectsorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Organization_projectsconditionautoApplyAfterParentPlan, + applyPlan: Organization_projectsconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed16(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Organization_projectsfilterautoApplyAfterParentPlan, + applyPlan: Organization_projectsfilterautoApplyAfterParentPlan } } }, @@ -13195,60 +13749,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Organization_membersfirstautoApplyAfterParentPlan, + applyPlan: Organization_membersfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Organization_memberslastautoApplyAfterParentPlan, + applyPlan: Organization_memberslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Organization_membersoffsetautoApplyAfterParentPlan, + applyPlan: Organization_membersoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Organization_membersbeforeautoApplyAfterParentPlan, + applyPlan: Organization_membersbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Organization_membersafterautoApplyAfterParentPlan, + applyPlan: Organization_membersafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); - return null; - } + autoApplyAfterParentPlan: Organization_membersorderByautoApplyAfterParentPlan, + applyPlan: Organization_membersorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Organization_membersconditionautoApplyAfterParentPlan, + applyPlan: Organization_membersconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed17(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Organization_membersfilterautoApplyAfterParentPlan, + applyPlan: Organization_membersfilterautoApplyAfterParentPlan } } }, @@ -13261,60 +13791,36 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: Organization_invitationsfirstautoApplyAfterParentPlan, + applyPlan: Organization_invitationsfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: Organization_invitationslastautoApplyAfterParentPlan, + applyPlan: Organization_invitationslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: Organization_invitationsoffsetautoApplyAfterParentPlan, + applyPlan: Organization_invitationsoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: Organization_invitationsbeforeautoApplyAfterParentPlan, + applyPlan: Organization_invitationsbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: Organization_invitationsafterautoApplyAfterParentPlan, + applyPlan: Organization_invitationsafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); - return null; - } + autoApplyAfterParentPlan: Organization_invitationsorderByautoApplyAfterParentPlan, + applyPlan: Organization_invitationsorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: Organization_invitationsconditionautoApplyAfterParentPlan, + applyPlan: Organization_invitationsconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed18(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: Organization_invitationsfilterautoApplyAfterParentPlan, + applyPlan: Organization_invitationsfilterautoApplyAfterParentPlan } } } @@ -13342,24 +13848,12 @@ export const plans = { }, args: { groupBy: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(ProjectGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; - } + autoApplyAfterParentPlan: ProjectConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, + applyPlan: ProjectConnection_groupedAggregatesgroupByautoApplyAfterParentPlan }, having: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); - } + autoApplyAfterParentPlan: ProjectConnection_groupedAggregateshavingautoApplyAfterParentPlan, + applyPlan: ProjectConnection_groupedAggregateshavingautoApplyAfterParentPlan } } } @@ -13744,10 +14238,7 @@ export const plans = { step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); }); step.setOrderIsUnique(); @@ -13760,10 +14251,7 @@ export const plans = { step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); }); step.setOrderIsUnique(); @@ -13774,12 +14262,9 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -13787,12 +14272,9 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, NAME_ASC: { @@ -13800,12 +14282,8 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "name", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, NAME_DESC: { @@ -13813,12 +14291,8 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "name", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, IMAGE_ASC: { @@ -13826,12 +14300,8 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "image", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, IMAGE_DESC: { @@ -13839,12 +14309,8 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "image", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, DESCRIPTION_ASC: { @@ -13852,12 +14318,8 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "description", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, DESCRIPTION_DESC: { @@ -13865,12 +14327,8 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "description", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, ORGANIZATION_ID_ASC: { @@ -13878,12 +14336,8 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "organization_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, ORGANIZATION_ID_DESC: { @@ -13891,12 +14345,8 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "organization_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -13904,12 +14354,8 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -13917,12 +14363,8 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -13930,12 +14372,8 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -13943,12 +14381,8 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, SLUG_ASC: { @@ -13956,12 +14390,8 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "slug", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, SLUG_DESC: { @@ -13969,12 +14399,8 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "slug", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, POSTS_COUNT_ASC: { @@ -15154,10 +15580,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = undefined ? undefined(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec ? resolveInputCodec(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue ? resolveSqlValue($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve(sqlIdentifier, sqlValue, $input, $where, { @@ -15184,9 +15610,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve2(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "equalTo" @@ -15211,9 +15637,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve3(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEqualTo" @@ -15238,9 +15664,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve4(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "distinctFrom" @@ -15265,9 +15691,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve5(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notDistinctFrom" @@ -15292,9 +15718,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec3 ? resolveInputCodec3(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve6(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "in" @@ -15319,9 +15745,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec3 ? resolveInputCodec3(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve7(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIn" @@ -15346,9 +15772,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve8(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThan" @@ -15373,9 +15799,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve9(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThanOrEqualTo" @@ -15400,9 +15826,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve10(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThan" @@ -15427,9 +15853,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve11(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThanOrEqualTo" @@ -15453,10 +15879,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = undefined ? undefined(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec4 ? resolveInputCodec4(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue2 ? resolveSqlValue2($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve12(sqlIdentifier, sqlValue, $input, $where, { @@ -15483,9 +15909,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve13(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "equalTo" @@ -15510,9 +15936,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve14(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEqualTo" @@ -15537,9 +15963,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve15(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "distinctFrom" @@ -15564,9 +15990,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve16(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notDistinctFrom" @@ -15591,9 +16017,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec6 ? resolveInputCodec6(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve17(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "in" @@ -15618,9 +16044,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec6 ? resolveInputCodec6(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve18(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIn" @@ -15645,9 +16071,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve19(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThan" @@ -15672,9 +16098,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve20(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThanOrEqualTo" @@ -15699,9 +16125,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve21(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThan" @@ -15726,9 +16152,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve22(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThanOrEqualTo" @@ -15755,7 +16181,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput ? lambda($input, resolveInput) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve23(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "includes" @@ -15782,7 +16208,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput2 ? lambda($input, resolveInput2) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve24(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIncludes" @@ -15809,7 +16235,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput3 ? lambda($input, resolveInput3) : $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve25(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "includesInsensitive" @@ -15836,7 +16262,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput4 ? lambda($input, resolveInput4) : $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve26(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIncludesInsensitive" @@ -15863,7 +16289,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput5 ? lambda($input, resolveInput5) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve27(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "startsWith" @@ -15890,7 +16316,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput6 ? lambda($input, resolveInput6) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve28(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notStartsWith" @@ -15917,7 +16343,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput7 ? lambda($input, resolveInput7) : $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve29(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "startsWithInsensitive" @@ -15944,7 +16370,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput8 ? lambda($input, resolveInput8) : $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve30(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notStartsWithInsensitive" @@ -15971,7 +16397,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput9 ? lambda($input, resolveInput9) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve31(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "endsWith" @@ -15998,7 +16424,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput10 ? lambda($input, resolveInput10) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve32(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEndsWith" @@ -16025,7 +16451,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput11 ? lambda($input, resolveInput11) : $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve33(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "endsWithInsensitive" @@ -16052,7 +16478,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput12 ? lambda($input, resolveInput12) : $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve34(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEndsWithInsensitive" @@ -16077,9 +16503,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve35(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "like" @@ -16104,9 +16530,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve36(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notLike" @@ -16131,9 +16557,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier3 ? resolveSqlIdentifier3(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve37(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "likeInsensitive" @@ -16158,9 +16584,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier3 ? resolveSqlIdentifier3(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve38(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notLikeInsensitive" @@ -16185,7 +16611,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier4 ? resolveSqlIdentifier4(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec8 ? resolveInputCodec8(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue3 ? resolveSqlValue3($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve13(sqlIdentifier, sqlValue, $input, $where, { @@ -16212,7 +16638,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier5 ? resolveSqlIdentifier5(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec9 ? resolveInputCodec9(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue4 ? resolveSqlValue4($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve14(sqlIdentifier, sqlValue, $input, $where, { @@ -16239,7 +16665,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier6 ? resolveSqlIdentifier6(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec10 ? resolveInputCodec10(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue5 ? resolveSqlValue5($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve15(sqlIdentifier, sqlValue, $input, $where, { @@ -16266,7 +16692,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier7 ? resolveSqlIdentifier7(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec11 ? resolveInputCodec11(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue6 ? resolveSqlValue6($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve16(sqlIdentifier, sqlValue, $input, $where, { @@ -16293,7 +16719,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier8 ? resolveSqlIdentifier8(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec12 ? resolveInputCodec12(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue7 ? resolveSqlValue7($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve17(sqlIdentifier, sqlValue, $input, $where, { @@ -16320,7 +16746,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier9 ? resolveSqlIdentifier9(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec13 ? resolveInputCodec13(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue8 ? resolveSqlValue8($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve18(sqlIdentifier, sqlValue, $input, $where, { @@ -16347,7 +16773,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier10 ? resolveSqlIdentifier10(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec14 ? resolveInputCodec14(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue9 ? resolveSqlValue9($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve19(sqlIdentifier, sqlValue, $input, $where, { @@ -16374,7 +16800,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier11 ? resolveSqlIdentifier11(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec15 ? resolveInputCodec15(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue10 ? resolveSqlValue10($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve20(sqlIdentifier, sqlValue, $input, $where, { @@ -16401,7 +16827,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier12 ? resolveSqlIdentifier12(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec16 ? resolveInputCodec16(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue11 ? resolveSqlValue11($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve21(sqlIdentifier, sqlValue, $input, $where, { @@ -16428,7 +16854,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier13 ? resolveSqlIdentifier13(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec17 ? resolveInputCodec17(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue12 ? resolveSqlValue12($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve22(sqlIdentifier, sqlValue, $input, $where, { @@ -16454,10 +16880,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = undefined ? undefined(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec18 ? resolveInputCodec18(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue13 ? resolveSqlValue13($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve39(sqlIdentifier, sqlValue, $input, $where, { @@ -16484,9 +16910,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve40(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "equalTo" @@ -16511,9 +16937,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve41(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEqualTo" @@ -16538,9 +16964,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve42(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "distinctFrom" @@ -16565,9 +16991,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve43(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notDistinctFrom" @@ -16592,9 +17018,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec20 ? resolveInputCodec20(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve44(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "in" @@ -16619,9 +17045,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec20 ? resolveInputCodec20(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve45(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIn" @@ -16646,9 +17072,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve46(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThan" @@ -16673,9 +17099,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve47(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThanOrEqualTo" @@ -16700,9 +17126,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve48(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThan" @@ -16727,9 +17153,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve49(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThanOrEqualTo" @@ -17727,10 +18153,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = undefined ? undefined(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec21 ? resolveInputCodec21(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue14 ? resolveSqlValue14($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve50(sqlIdentifier, sqlValue, $input, $where, { @@ -17757,9 +18183,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve51(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "equalTo" @@ -17784,9 +18210,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve52(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEqualTo" @@ -17811,9 +18237,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve53(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "distinctFrom" @@ -17838,9 +18264,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve54(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notDistinctFrom" @@ -17865,9 +18291,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec23 ? resolveInputCodec23(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve55(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "in" @@ -17892,9 +18318,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec23 ? resolveInputCodec23(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve56(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIn" @@ -17919,9 +18345,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve57(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThan" @@ -17946,9 +18372,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve58(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThanOrEqualTo" @@ -17973,9 +18399,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve59(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThan" @@ -18000,9 +18426,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve60(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThanOrEqualTo" @@ -18369,10 +18795,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = undefined ? undefined(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec24 ? resolveInputCodec24(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue15 ? resolveSqlValue15($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve61(sqlIdentifier, sqlValue, $input, $where, { @@ -18399,9 +18825,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve62(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "equalTo" @@ -18426,9 +18852,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve63(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEqualTo" @@ -18453,9 +18879,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve64(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "distinctFrom" @@ -18480,9 +18906,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve65(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notDistinctFrom" @@ -18507,9 +18933,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec26 ? resolveInputCodec26(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve66(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "in" @@ -18534,9 +18960,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec26 ? resolveInputCodec26(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve67(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIn" @@ -18561,9 +18987,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve68(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThan" @@ -18588,9 +19014,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve69(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThanOrEqualTo" @@ -18615,9 +19041,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve70(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThan" @@ -18642,9 +19068,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve71(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThanOrEqualTo" @@ -20261,10 +20687,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = undefined ? undefined(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec27 ? resolveInputCodec27(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue16 ? resolveSqlValue16($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve72(sqlIdentifier, sqlValue, $input, $where, { @@ -20291,9 +20717,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve73(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "equalTo" @@ -20318,9 +20744,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve74(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEqualTo" @@ -20345,9 +20771,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve75(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "distinctFrom" @@ -20372,9 +20798,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve76(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notDistinctFrom" @@ -20399,9 +20825,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec29 ? resolveInputCodec29(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve77(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "in" @@ -20426,9 +20852,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec29 ? resolveInputCodec29(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve78(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIn" @@ -20453,9 +20879,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve79(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThan" @@ -20480,9 +20906,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve80(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThanOrEqualTo" @@ -20507,9 +20933,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve81(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThan" @@ -20534,9 +20960,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = undefined ? lambda($input, undefined) : $input, + const $resolvedInput = $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), + sqlValue = $where.placeholder($resolvedInput, inputCodec), fragment = resolve82(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThanOrEqualTo" @@ -20835,24 +21261,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(MemberGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; - } + autoApplyAfterParentPlan: MemberConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, + applyPlan: MemberConnection_groupedAggregatesgroupByautoApplyAfterParentPlan }, having: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); - } + autoApplyAfterParentPlan: MemberConnection_groupedAggregateshavingautoApplyAfterParentPlan, + applyPlan: MemberConnection_groupedAggregateshavingautoApplyAfterParentPlan } } } @@ -20920,60 +21334,36 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: User_postsfirstautoApplyAfterParentPlan, + applyPlan: User_postsfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: User_postslastautoApplyAfterParentPlan, + applyPlan: User_postslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: User_postsoffsetautoApplyAfterParentPlan, + applyPlan: User_postsoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: User_postsbeforeautoApplyAfterParentPlan, + applyPlan: User_postsbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: User_postsafterautoApplyAfterParentPlan, + applyPlan: User_postsafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); - return null; - } + autoApplyAfterParentPlan: User_postsorderByautoApplyAfterParentPlan, + applyPlan: User_postsorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: User_postsconditionautoApplyAfterParentPlan, + applyPlan: User_postsconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed56(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: User_postsfilterautoApplyAfterParentPlan, + applyPlan: User_postsfilterautoApplyAfterParentPlan } } }, @@ -20986,60 +21376,36 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: User_upvotesfirstautoApplyAfterParentPlan, + applyPlan: User_upvotesfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: User_upvoteslastautoApplyAfterParentPlan, + applyPlan: User_upvoteslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: User_upvotesoffsetautoApplyAfterParentPlan, + applyPlan: User_upvotesoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: User_upvotesbeforeautoApplyAfterParentPlan, + applyPlan: User_upvotesbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: User_upvotesafterautoApplyAfterParentPlan, + applyPlan: User_upvotesafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); - return null; - } + autoApplyAfterParentPlan: User_upvotesorderByautoApplyAfterParentPlan, + applyPlan: User_upvotesorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: User_upvotesconditionautoApplyAfterParentPlan, + applyPlan: User_upvotesconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed57(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: User_upvotesfilterautoApplyAfterParentPlan, + applyPlan: User_upvotesfilterautoApplyAfterParentPlan } } }, @@ -21052,60 +21418,36 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: User_membersfirstautoApplyAfterParentPlan, + applyPlan: User_membersfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: User_memberslastautoApplyAfterParentPlan, + applyPlan: User_memberslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: User_membersoffsetautoApplyAfterParentPlan, + applyPlan: User_membersoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: User_membersbeforeautoApplyAfterParentPlan, + applyPlan: User_membersbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: User_membersafterautoApplyAfterParentPlan, + applyPlan: User_membersafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); - return null; - } + autoApplyAfterParentPlan: User_membersorderByautoApplyAfterParentPlan, + applyPlan: User_membersorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: User_membersconditionautoApplyAfterParentPlan, + applyPlan: User_membersconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed58(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: User_membersfilterautoApplyAfterParentPlan, + applyPlan: User_membersfilterautoApplyAfterParentPlan } } }, @@ -21118,60 +21460,36 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: User_commentsfirstautoApplyAfterParentPlan, + applyPlan: User_commentsfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: User_commentslastautoApplyAfterParentPlan, + applyPlan: User_commentslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: User_commentsoffsetautoApplyAfterParentPlan, + applyPlan: User_commentsoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: User_commentsbeforeautoApplyAfterParentPlan, + applyPlan: User_commentsbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: User_commentsafterautoApplyAfterParentPlan, + applyPlan: User_commentsafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); - return null; - } + autoApplyAfterParentPlan: User_commentsorderByautoApplyAfterParentPlan, + applyPlan: User_commentsorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: User_commentsconditionautoApplyAfterParentPlan, + applyPlan: User_commentsconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed59(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: User_commentsfilterautoApplyAfterParentPlan, + applyPlan: User_commentsfilterautoApplyAfterParentPlan } } }, @@ -21184,60 +21502,36 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: User_downvotesfirstautoApplyAfterParentPlan, + applyPlan: User_downvotesfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: User_downvoteslastautoApplyAfterParentPlan, + applyPlan: User_downvoteslastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: User_downvotesoffsetautoApplyAfterParentPlan, + applyPlan: User_downvotesoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: User_downvotesbeforeautoApplyAfterParentPlan, + applyPlan: User_downvotesbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: User_downvotesafterautoApplyAfterParentPlan, + applyPlan: User_downvotesafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); - return null; - } + autoApplyAfterParentPlan: User_downvotesorderByautoApplyAfterParentPlan, + applyPlan: User_downvotesorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: User_downvotesconditionautoApplyAfterParentPlan, + applyPlan: User_downvotesconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed60(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: User_downvotesfilterautoApplyAfterParentPlan, + applyPlan: User_downvotesfilterautoApplyAfterParentPlan } } } @@ -21265,24 +21559,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(PostGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; - } + autoApplyAfterParentPlan: PostConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, + applyPlan: PostConnection_groupedAggregatesgroupByautoApplyAfterParentPlan }, having: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); - } + autoApplyAfterParentPlan: PostConnection_groupedAggregateshavingautoApplyAfterParentPlan, + applyPlan: PostConnection_groupedAggregateshavingautoApplyAfterParentPlan } } } @@ -21675,10 +21957,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); }); step.setOrderIsUnique(); @@ -21691,10 +21970,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); }); step.setOrderIsUnique(); @@ -21705,12 +21981,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -21718,12 +21991,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, TITLE_ASC: { @@ -21731,12 +22001,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "title", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, TITLE_DESC: { @@ -21744,12 +22010,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "title", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, DESCRIPTION_ASC: { @@ -21757,12 +22019,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "description", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, DESCRIPTION_DESC: { @@ -21770,12 +22028,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "description", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, PROJECT_ID_ASC: { @@ -21783,12 +22037,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "project_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, PROJECT_ID_DESC: { @@ -21796,12 +22046,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "project_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, USER_ID_ASC: { @@ -21809,12 +22055,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, USER_ID_DESC: { @@ -21822,12 +22064,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -21835,12 +22073,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -21848,12 +22082,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -21861,12 +22091,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -21874,12 +22100,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, STATUS_ID_ASC: { @@ -21887,12 +22109,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "status_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, STATUS_ID_DESC: { @@ -21900,12 +22118,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "status_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, STATUS_UPDATED_AT_ASC: { @@ -21913,12 +22127,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "status_updated_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, STATUS_UPDATED_AT_DESC: { @@ -21926,12 +22136,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "status_updated_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, UPVOTES_COUNT_ASC: { @@ -22955,24 +23161,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(UpvoteGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; - } + autoApplyAfterParentPlan: UpvoteConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, + applyPlan: UpvoteConnection_groupedAggregatesgroupByautoApplyAfterParentPlan }, having: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); - } + autoApplyAfterParentPlan: UpvoteConnection_groupedAggregateshavingautoApplyAfterParentPlan, + applyPlan: UpvoteConnection_groupedAggregateshavingautoApplyAfterParentPlan } } } @@ -23292,10 +23486,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); }); step.setOrderIsUnique(); @@ -23308,10 +23499,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); }); step.setOrderIsUnique(); @@ -23322,12 +23510,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -23335,12 +23520,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, POST_ID_ASC: { @@ -23348,12 +23530,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "post_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, POST_ID_DESC: { @@ -23361,12 +23540,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "post_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, USER_ID_ASC: { @@ -23374,12 +23550,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, USER_ID_DESC: { @@ -23387,12 +23559,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -23400,12 +23568,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -23413,12 +23577,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -23426,12 +23586,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -23439,12 +23595,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } } }, @@ -23556,10 +23708,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); }); step.setOrderIsUnique(); @@ -23572,10 +23721,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); }); step.setOrderIsUnique(); @@ -23586,12 +23732,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, USER_ID_DESC: { @@ -23599,12 +23742,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, ORGANIZATION_ID_ASC: { @@ -23612,12 +23752,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "organization_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, ORGANIZATION_ID_DESC: { @@ -23625,12 +23761,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "organization_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -23638,12 +23770,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -23651,12 +23779,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, ROLE_ASC: { @@ -23664,12 +23788,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "role", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, ROLE_DESC: { @@ -23677,12 +23797,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "role", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, ROW_ID_ASC: { @@ -23690,12 +23806,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -23703,12 +23816,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } } }, @@ -23832,24 +23942,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(CommentGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; - } + autoApplyAfterParentPlan: CommentConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, + applyPlan: CommentConnection_groupedAggregatesgroupByautoApplyAfterParentPlan }, having: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); - } + autoApplyAfterParentPlan: CommentConnection_groupedAggregateshavingautoApplyAfterParentPlan, + applyPlan: CommentConnection_groupedAggregateshavingautoApplyAfterParentPlan } } } @@ -24180,10 +24278,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); }); step.setOrderIsUnique(); @@ -24196,10 +24291,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); }); step.setOrderIsUnique(); @@ -24210,12 +24302,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -24223,12 +24312,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, MESSAGE_ASC: { @@ -24236,12 +24322,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "message", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, MESSAGE_DESC: { @@ -24249,12 +24331,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "message", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, POST_ID_ASC: { @@ -24262,12 +24340,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "post_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, POST_ID_DESC: { @@ -24275,12 +24349,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "post_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, USER_ID_ASC: { @@ -24288,12 +24358,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, USER_ID_DESC: { @@ -24301,12 +24367,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -24314,12 +24376,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -24327,12 +24385,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -24340,12 +24394,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -24353,12 +24403,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } } }, @@ -24501,24 +24547,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(DownvoteGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; - } + autoApplyAfterParentPlan: DownvoteConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, + applyPlan: DownvoteConnection_groupedAggregatesgroupByautoApplyAfterParentPlan }, having: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); - } + autoApplyAfterParentPlan: DownvoteConnection_groupedAggregateshavingautoApplyAfterParentPlan, + applyPlan: DownvoteConnection_groupedAggregateshavingautoApplyAfterParentPlan } } } @@ -24810,10 +24844,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); }); step.setOrderIsUnique(); @@ -24826,10 +24857,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); }); step.setOrderIsUnique(); @@ -24840,12 +24868,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -24853,12 +24878,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, POST_ID_ASC: { @@ -24866,12 +24888,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "post_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, POST_ID_DESC: { @@ -24879,12 +24898,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "post_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, USER_ID_ASC: { @@ -24892,12 +24908,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, USER_ID_DESC: { @@ -24905,12 +24917,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -24918,12 +24926,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -24931,12 +24935,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -24944,12 +24944,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -24957,12 +24953,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } } }, @@ -25293,24 +25285,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(InvitationGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; - } + autoApplyAfterParentPlan: InvitationConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, + applyPlan: InvitationConnection_groupedAggregatesgroupByautoApplyAfterParentPlan }, having: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); - } + autoApplyAfterParentPlan: InvitationConnection_groupedAggregateshavingautoApplyAfterParentPlan, + applyPlan: InvitationConnection_groupedAggregateshavingautoApplyAfterParentPlan } } } @@ -25622,10 +25602,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); }); step.setOrderIsUnique(); @@ -25638,10 +25615,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); }); step.setOrderIsUnique(); @@ -25652,12 +25626,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -25665,12 +25636,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, ORGANIZATION_ID_ASC: { @@ -25678,12 +25646,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "organization_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, ORGANIZATION_ID_DESC: { @@ -25691,12 +25655,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "organization_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, EMAIL_ASC: { @@ -25704,12 +25664,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "email", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, EMAIL_DESC: { @@ -25717,12 +25674,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "email", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -25730,12 +25684,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -25743,12 +25693,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -25756,12 +25702,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -25769,12 +25711,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } } }, @@ -25898,24 +25836,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(PostStatusGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; - } + autoApplyAfterParentPlan: PostStatusConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, + applyPlan: PostStatusConnection_groupedAggregatesgroupByautoApplyAfterParentPlan }, having: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); - } + autoApplyAfterParentPlan: PostStatusConnection_groupedAggregateshavingautoApplyAfterParentPlan, + applyPlan: PostStatusConnection_groupedAggregateshavingautoApplyAfterParentPlan } } } @@ -25960,60 +25886,36 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { first: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); - } + autoApplyAfterParentPlan: PostStatus_postsByStatusIdfirstautoApplyAfterParentPlan, + applyPlan: PostStatus_postsByStatusIdfirstautoApplyAfterParentPlan }, last: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); - } + autoApplyAfterParentPlan: PostStatus_postsByStatusIdlastautoApplyAfterParentPlan, + applyPlan: PostStatus_postsByStatusIdlastautoApplyAfterParentPlan }, offset: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); - } + autoApplyAfterParentPlan: PostStatus_postsByStatusIdoffsetautoApplyAfterParentPlan, + applyPlan: PostStatus_postsByStatusIdoffsetautoApplyAfterParentPlan }, before: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); - } + autoApplyAfterParentPlan: PostStatus_postsByStatusIdbeforeautoApplyAfterParentPlan, + applyPlan: PostStatus_postsByStatusIdbeforeautoApplyAfterParentPlan }, after: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); - } + autoApplyAfterParentPlan: PostStatus_postsByStatusIdafterautoApplyAfterParentPlan, + applyPlan: PostStatus_postsByStatusIdafterautoApplyAfterParentPlan }, orderBy: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); - return null; - } + autoApplyAfterParentPlan: PostStatus_postsByStatusIdorderByautoApplyAfterParentPlan, + applyPlan: PostStatus_postsByStatusIdorderByautoApplyAfterParentPlan }, condition: { - autoApplyAfterParentPlan: true, - applyPlan(_condition, $connection) { - return $connection.getSubplan().wherePlan(); - } + autoApplyAfterParentPlan: PostStatus_postsByStatusIdconditionautoApplyAfterParentPlan, + applyPlan: PostStatus_postsByStatusIdconditionautoApplyAfterParentPlan }, filter: { - autoApplyAfterParentPlan: true, - applyPlan(_, $connection, fieldArgs) { - assertAllowed61(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - if (null) $where.extensions.pgFilterAttribute = { - codec: null - }; - fieldArgs.apply($where); - } + autoApplyAfterParentPlan: PostStatus_postsByStatusIdfilterautoApplyAfterParentPlan, + applyPlan: PostStatus_postsByStatusIdfilterautoApplyAfterParentPlan } } } @@ -26329,10 +26231,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); }); step.setOrderIsUnique(); @@ -26345,10 +26244,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); }); step.setOrderIsUnique(); @@ -26359,12 +26255,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -26372,12 +26265,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, STATUS_ASC: { @@ -26385,12 +26275,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "status", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, STATUS_DESC: { @@ -26398,12 +26284,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "status", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, DESCRIPTION_ASC: { @@ -26411,12 +26293,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "description", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, DESCRIPTION_DESC: { @@ -26424,12 +26302,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "description", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, COLOR_ASC: { @@ -26437,12 +26311,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "color", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, COLOR_DESC: { @@ -26450,12 +26320,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "color", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, PROJECT_ID_ASC: { @@ -26463,12 +26329,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "project_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, PROJECT_ID_DESC: { @@ -26476,12 +26338,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "project_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, IS_DEFAULT_ASC: { @@ -26489,12 +26347,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "is_default", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, IS_DEFAULT_DESC: { @@ -26502,12 +26356,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "is_default", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -26515,12 +26365,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -26528,12 +26374,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -26541,12 +26383,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -26554,12 +26392,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, POSTS_BY_STATUS_ID_COUNT_ASC: { @@ -27176,24 +27010,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(OrganizationGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; - } + autoApplyAfterParentPlan: OrganizationConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, + applyPlan: OrganizationConnection_groupedAggregatesgroupByautoApplyAfterParentPlan }, having: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); - } + autoApplyAfterParentPlan: OrganizationConnection_groupedAggregateshavingautoApplyAfterParentPlan, + applyPlan: OrganizationConnection_groupedAggregateshavingautoApplyAfterParentPlan } } } @@ -27482,10 +27304,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); }); step.setOrderIsUnique(); @@ -27498,10 +27317,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); }); step.setOrderIsUnique(); @@ -27512,12 +27328,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -27525,12 +27338,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, NAME_ASC: { @@ -27538,12 +27348,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "name", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, NAME_DESC: { @@ -27551,12 +27358,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "name", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -27564,12 +27368,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -27577,12 +27377,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -27590,12 +27386,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -27603,12 +27395,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, SLUG_ASC: { @@ -27616,12 +27404,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "slug", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, SLUG_DESC: { @@ -27629,12 +27413,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "slug", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, PROJECTS_COUNT_ASC: { @@ -28670,24 +28450,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(UserGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; - } + autoApplyAfterParentPlan: UserConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, + applyPlan: UserConnection_groupedAggregatesgroupByautoApplyAfterParentPlan }, having: { - autoApplyAfterParentPlan: true, - applyPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); - } + autoApplyAfterParentPlan: UserConnection_groupedAggregateshavingautoApplyAfterParentPlan, + applyPlan: UserConnection_groupedAggregateshavingautoApplyAfterParentPlan } } } @@ -28994,10 +28762,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); }); step.setOrderIsUnique(); @@ -29010,10 +28775,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); }); step.setOrderIsUnique(); @@ -29024,12 +28786,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -29037,12 +28796,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -29050,12 +28806,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -29063,12 +28815,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -29076,12 +28824,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -29089,12 +28833,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, HIDRA_ID_ASC: { @@ -29102,12 +28842,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "hidra_id", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, HIDRA_ID_DESC: { @@ -29115,12 +28852,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "hidra_id", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, USERNAME_ASC: { @@ -29128,12 +28862,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "username", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, USERNAME_DESC: { @@ -29141,12 +28872,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "username", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, FIRST_NAME_ASC: { @@ -29154,12 +28882,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "first_name", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, FIRST_NAME_DESC: { @@ -29167,12 +28891,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "first_name", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, LAST_NAME_ASC: { @@ -29180,12 +28900,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "last_name", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (false) plan.setOrderIsUnique(); } }, LAST_NAME_DESC: { @@ -29193,12 +28909,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "last_name", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (false) plan.setOrderIsUnique(); } }, EMAIL_ASC: { @@ -29206,12 +28918,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "email", - direction: "ASC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "ASC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, EMAIL_DESC: { @@ -29219,12 +28928,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "email", - direction: "DESC", - ...(undefined != null ? { - nulls: undefined ? "LAST" : "FIRST" - } : null) + direction: "DESC" }); - if (true) plan.setOrderIsUnique(); + plan.setOrderIsUnique(); } }, POSTS_COUNT_ASC: { @@ -30914,10 +30620,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { input: { - autoApplyAfterParentPlan: true, - applyPlan(_, $object) { - return $object; - } + autoApplyAfterParentPlan: Mutation_createDownvoteinputautoApplyAfterParentPlan, + applyPlan: Mutation_createDownvoteinputautoApplyAfterParentPlan } } }, @@ -30931,10 +30635,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { input: { - autoApplyAfterParentPlan: true, - applyPlan(_, $object) { - return $object; - } + autoApplyAfterParentPlan: Mutation_createInvitationinputautoApplyAfterParentPlan, + applyPlan: Mutation_createInvitationinputautoApplyAfterParentPlan } } }, @@ -30948,10 +30650,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { input: { - autoApplyAfterParentPlan: true, - applyPlan(_, $object) { - return $object; - } + autoApplyAfterParentPlan: Mutation_createUpvoteinputautoApplyAfterParentPlan, + applyPlan: Mutation_createUpvoteinputautoApplyAfterParentPlan } } }, @@ -30965,10 +30665,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { input: { - autoApplyAfterParentPlan: true, - applyPlan(_, $object) { - return $object; - } + autoApplyAfterParentPlan: Mutation_createCommentinputautoApplyAfterParentPlan, + applyPlan: Mutation_createCommentinputautoApplyAfterParentPlan } } }, @@ -30982,10 +30680,8 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { input: { - autoApplyAfterParentPlan: true, - applyPlan(_, $object) { - return $object; - } + autoApplyAfterParentPlan: Mutation_createOrganizationinputautoApplyAfterParentPlan, + applyPlan: Mutation_createOrganizationinputautoApplyAfterParentPlan } } }, @@ -31008,10 +30704,8 @@ ${String(oldPlan)}`); }, args: { input: { - autoApplyAfterParentPlan: true, - applyPlan(_, $object) { - return $object; - } + autoApplyAfterParentPlan: Mutation_createProjectinputautoApplyAfterParentPlan, + applyPlan: Mutation_createProjectinputautoApplyAfterParentPlan } } }, @@ -31025,10 +30719,8 @@ ${String(oldPlan)}`); }, args: { input: { - autoApplyAfterParentPlan: true, - applyPlan(_, $object) { - return $object; - } + autoApplyAfterParentPlan: Mutation_createPostinputautoApplyAfterParentPlan, + applyPlan: Mutation_createPostinputautoApplyAfterParentPlan } } }, @@ -31051,10 +30743,8 @@ ${String(oldPlan2)}`); }, args: { input: { - autoApplyAfterParentPlan: true, - applyPlan(_, $object) { - return $object; - } + autoApplyAfterParentPlan: Mutation_createPostStatusinputautoApplyAfterParentPlan, + applyPlan: Mutation_createPostStatusinputautoApplyAfterParentPlan } } }, @@ -31068,10 +30758,8 @@ ${String(oldPlan2)}`); }, args: { input: { - autoApplyAfterParentPlan: true, - applyPlan(_, $object) { - return $object; - } + autoApplyAfterParentPlan: Mutation_createUserinputautoApplyAfterParentPlan, + applyPlan: Mutation_createUserinputautoApplyAfterParentPlan } } }, @@ -31094,10 +30782,8 @@ ${String(oldPlan3)}`); }, args: { input: { - autoApplyAfterParentPlan: true, - applyPlan(_, $object) { - return $object; - } + autoApplyAfterParentPlan: Mutation_createMemberinputautoApplyAfterParentPlan, + applyPlan: Mutation_createMemberinputautoApplyAfterParentPlan } } }, @@ -31119,10 +30805,8 @@ ${String(oldPlan4)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31137,10 +30821,8 @@ ${String(oldPlan4)}`); return plan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31162,10 +30844,8 @@ ${String(oldPlan5)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31187,10 +30867,8 @@ ${String(oldPlan6)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31212,10 +30890,8 @@ ${String(oldPlan7)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31237,10 +30913,8 @@ ${String(oldPlan8)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31262,10 +30936,8 @@ ${String(oldPlan9)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31287,10 +30959,8 @@ ${String(oldPlan10)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31312,10 +30982,8 @@ ${String(oldPlan11)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31337,10 +31005,8 @@ ${String(oldPlan12)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31362,10 +31028,8 @@ ${String(oldPlan13)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31380,10 +31044,8 @@ ${String(oldPlan13)}`); return plan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31405,10 +31067,8 @@ ${String(oldPlan14)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31430,10 +31090,8 @@ ${String(oldPlan15)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31455,10 +31113,8 @@ ${String(oldPlan16)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31480,10 +31136,8 @@ ${String(oldPlan17)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31505,10 +31159,8 @@ ${String(oldPlan18)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31530,10 +31182,8 @@ ${String(oldPlan19)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31555,10 +31205,8 @@ ${String(oldPlan20)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } }, @@ -31580,10 +31228,8 @@ ${String(oldPlan21)}`); return $newPlan; }, args: { - input: { - applyPlan(_, $object) { - return $object; - } + input(_, $object) { + return $object; } } } @@ -31599,28 +31245,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - downvoteEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = downvoteUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_downvotePgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + downvoteEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = downvoteUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_downvotePgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, CreateDownvoteInput: { @@ -31638,9 +31279,6 @@ ${String(oldPlan21)}`); } }, DownvoteInput: { - "__inputPlan": function DownvoteInput_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -31688,28 +31326,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - invitationEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = invitationUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_invitationPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + invitationEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = invitationUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_invitationPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, CreateInvitationInput: { @@ -31727,9 +31360,6 @@ ${String(oldPlan21)}`); } }, InvitationInput: { - "__inputPlan": function InvitationInput_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -31777,28 +31407,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - upvoteEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = upvoteUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_upvotePgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + upvoteEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = upvoteUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_upvotePgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, CreateUpvoteInput: { @@ -31816,9 +31441,6 @@ ${String(oldPlan21)}`); } }, UpvoteInput: { - "__inputPlan": function UpvoteInput_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -31866,28 +31488,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - commentEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = commentUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_commentPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + commentEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = commentUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_commentPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, CreateCommentInput: { @@ -31905,9 +31522,6 @@ ${String(oldPlan21)}`); } }, CommentInput: { - "__inputPlan": function CommentInput_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -31962,28 +31576,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - organizationEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = organizationUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_organizationPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + organizationEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = organizationUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_organizationPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, CreateOrganizationInput: { @@ -32001,9 +31610,6 @@ ${String(oldPlan21)}`); } }, OrganizationInput: { - "__inputPlan": function OrganizationInput_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32051,28 +31657,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - projectEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = projectUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_projectPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + projectEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = projectUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_projectPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, CreateProjectInput: { @@ -32090,9 +31691,6 @@ ${String(oldPlan21)}`); } }, ProjectInput: { - "__inputPlan": function ProjectInput_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32161,28 +31759,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - postEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = postUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_postPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + postEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = postUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_postPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, CreatePostInput: { @@ -32200,9 +31793,6 @@ ${String(oldPlan21)}`); } }, PostInput: { - "__inputPlan": function PostInput_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32278,28 +31868,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - postStatusEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_post_statusPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + postStatusEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_post_statusPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, CreatePostStatusInput: { @@ -32317,9 +31902,6 @@ ${String(oldPlan21)}`); } }, PostStatusInput: { - "__inputPlan": function PostStatusInput_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32388,28 +31970,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - userEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = userUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_userPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + userEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = userUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_userPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, CreateUserInput: { @@ -32427,9 +32004,6 @@ ${String(oldPlan21)}`); } }, UserInput: { - "__inputPlan": function UserInput_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32498,28 +32072,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - memberEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_memberPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + memberEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_memberPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, CreateMemberInput: { @@ -32537,9 +32106,6 @@ ${String(oldPlan21)}`); } }, MemberInput: { - "__inputPlan": function MemberInput_inputPlan() { - return object(Object.create(null)); - }, userId: { applyPlan($insert, val) { $insert.set("user_id", val.get()); @@ -32587,28 +32153,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - downvoteEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = downvoteUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_downvotePgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + downvoteEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = downvoteUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_downvotePgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, UpdateDownvoteInput: { @@ -32617,7 +32178,6 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, - rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32625,9 +32185,6 @@ ${String(oldPlan21)}`); } }, DownvotePatch: { - "__inputPlan": function DownvotePatch_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32675,28 +32232,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - invitationEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = invitationUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_invitationPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + invitationEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = invitationUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_invitationPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, UpdateInvitationInput: { @@ -32705,7 +32257,6 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, - rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32713,9 +32264,6 @@ ${String(oldPlan21)}`); } }, InvitationPatch: { - "__inputPlan": function InvitationPatch_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32763,28 +32311,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - upvoteEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = upvoteUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_upvotePgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + upvoteEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = upvoteUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_upvotePgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, UpdateUpvoteInput: { @@ -32793,7 +32336,6 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, - rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32801,9 +32343,6 @@ ${String(oldPlan21)}`); } }, UpvotePatch: { - "__inputPlan": function UpvotePatch_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32851,28 +32390,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - commentEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = commentUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_commentPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + commentEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = commentUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_commentPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, UpdateCommentInput: { @@ -32881,7 +32415,6 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, - rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32889,9 +32422,6 @@ ${String(oldPlan21)}`); } }, CommentPatch: { - "__inputPlan": function CommentPatch_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32946,28 +32476,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - organizationEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = organizationUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_organizationPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + organizationEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = organizationUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_organizationPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, UpdateOrganizationInput: { @@ -32976,7 +32501,6 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, - rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32984,9 +32508,6 @@ ${String(oldPlan21)}`); } }, OrganizationPatch: { - "__inputPlan": function OrganizationPatch_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -33034,28 +32555,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - projectEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = projectUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_projectPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + projectEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = projectUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_projectPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, UpdateProjectInput: { @@ -33064,7 +32580,6 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, - rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -33072,9 +32587,6 @@ ${String(oldPlan21)}`); } }, ProjectPatch: { - "__inputPlan": function ProjectPatch_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -33143,28 +32655,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - postEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = postUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_postPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + postEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = postUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_postPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, UpdatePostInput: { @@ -33173,7 +32680,6 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, - rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -33181,9 +32687,6 @@ ${String(oldPlan21)}`); } }, PostPatch: { - "__inputPlan": function PostPatch_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -33259,28 +32762,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - postStatusEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_post_statusPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + postStatusEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_post_statusPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, UpdatePostStatusInput: { @@ -33289,7 +32787,6 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, - rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -33297,9 +32794,6 @@ ${String(oldPlan21)}`); } }, PostStatusPatch: { - "__inputPlan": function PostStatusPatch_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -33368,28 +32862,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - userEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = userUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_userPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + userEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = userUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_userPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, UpdateUserInput: { @@ -33398,7 +32887,6 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, - rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -33406,9 +32894,6 @@ ${String(oldPlan21)}`); } }, UserPatch: { - "__inputPlan": function UserPatch_inputPlan() { - return object(Object.create(null)); - }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -33477,28 +32962,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - memberEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_memberPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + memberEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_memberPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, UpdateMemberInput: { @@ -33507,7 +32987,6 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, - rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -33515,9 +32994,6 @@ ${String(oldPlan21)}`); } }, MemberPatch: { - "__inputPlan": function MemberPatch_inputPlan() { - return object(Object.create(null)); - }, userId: { applyPlan($insert, val) { $insert.set("user_id", val.get()); @@ -33565,28 +33041,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - downvoteEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = downvoteUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_downvotePgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + downvoteEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = downvoteUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_downvotePgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, DeleteDownvoteInput: { @@ -33594,8 +33065,7 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - }, - rowId: undefined + } }, DeleteInvitationPayload: { __assertStep: ObjectStep, @@ -33608,28 +33078,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - invitationEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = invitationUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_invitationPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + invitationEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = invitationUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_invitationPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, DeleteInvitationInput: { @@ -33637,8 +33102,7 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - }, - rowId: undefined + } }, DeleteUpvotePayload: { __assertStep: ObjectStep, @@ -33651,28 +33115,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - upvoteEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = upvoteUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_upvotePgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + upvoteEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = upvoteUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_upvotePgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, DeleteUpvoteInput: { @@ -33680,8 +33139,7 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - }, - rowId: undefined + } }, DeleteCommentPayload: { __assertStep: ObjectStep, @@ -33694,28 +33152,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - commentEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = commentUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_commentPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + commentEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = commentUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_commentPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, DeleteCommentInput: { @@ -33723,8 +33176,7 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - }, - rowId: undefined + } }, DeleteOrganizationPayload: { __assertStep: ObjectStep, @@ -33737,28 +33189,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - organizationEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = organizationUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_organizationPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + organizationEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = organizationUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_organizationPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, DeleteOrganizationInput: { @@ -33766,8 +33213,7 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - }, - rowId: undefined + } }, DeleteProjectPayload: { __assertStep: ObjectStep, @@ -33780,28 +33226,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - projectEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = projectUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_projectPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + projectEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = projectUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_projectPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, DeleteProjectInput: { @@ -33809,8 +33250,7 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - }, - rowId: undefined + } }, DeletePostPayload: { __assertStep: ObjectStep, @@ -33823,28 +33263,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - postEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = postUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_postPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + postEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = postUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_postPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, DeletePostInput: { @@ -33852,8 +33287,7 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - }, - rowId: undefined + } }, DeletePostStatusPayload: { __assertStep: ObjectStep, @@ -33866,28 +33300,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - postStatusEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_post_statusPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + postStatusEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_post_statusPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, DeletePostStatusInput: { @@ -33895,8 +33324,7 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - }, - rowId: undefined + } }, DeleteUserPayload: { __assertStep: ObjectStep, @@ -33909,28 +33337,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - userEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = userUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_userPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + userEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = userUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_userPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, DeleteUserInput: { @@ -33938,8 +33361,7 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - }, - rowId: undefined + } }, DeleteMemberPayload: { __assertStep: ObjectStep, @@ -33952,28 +33374,23 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - memberEdge: { - plan($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_memberPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); - }, - args: { - orderBy: undefined - } + memberEdge($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_memberPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); } }, DeleteMemberInput: { @@ -33981,8 +33398,7 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - }, - rowId: undefined + } } }; export const schema = makeGrafastSchema({ From e030959168985488cf6c56a9dac097120227ade9 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Thu, 17 Apr 2025 21:24:57 -0500 Subject: [PATCH 25/29] feature: add Dockerfile, .dockerignore --- .dockerignore | 5 +++++ Dockerfile | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..09fe9b2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +Dockerfile +.dockerignore +node_modules +README.md +.git diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6356593 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +ARG BUN_VERSION=1.2.5 +FROM oven/bun:${BUN_VERSION}-slim as base + +WORKDIR /app + +ENV NODE_ENV="production" + +FROM base as build + +RUN apt-get update -qq && \ + apt-get install --no-install-recommends -y build-essential pkg-config python-is-python3 + +COPY --link bun.lock package.json ./ +RUN bun install --ci + +COPY --link . . + +FROM base + +COPY --from=build /app /app + +EXPOSE 3000 +CMD [ "bun", "run", "start" ] From 4eca0e6790cf8b1cd7a8f2ce8f647e8662127a9e Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Thu, 17 Apr 2025 21:29:34 -0500 Subject: [PATCH 26/29] feature(docker): add build step --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 6356593..3af9ad3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,8 @@ RUN bun install --ci COPY --link . . +RUN bun run build + FROM base COPY --from=build /app /app From 9d1db9f6eda8ba994c40f56e3096d01b38a9bba1 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Fri, 18 Apr 2025 12:28:52 -0500 Subject: [PATCH 27/29] build(deps): rollback Graphile dependencies --- bun.lock | 8 +- package.json | 4 +- src/generated/graphql/schema.executable.ts | 6100 +++++++++++--------- 3 files changed, 3348 insertions(+), 2764 deletions(-) diff --git a/bun.lock b/bun.lock index a881012..008665f 100644 --- a/bun.lock +++ b/bun.lock @@ -8,11 +8,11 @@ "@envelop/validation-cache": "^8.1.3", "@escape.tech/graphql-armor": "^3.1.2", "@graphile/pg-aggregates": "0.2.0-beta.7", - "@graphile/simplify-inflection": "8.0.0-beta.6", + "@graphile/simplify-inflection": "8.0.0-beta.5", "dayjs": "^1.11.13", "drizzle-orm": "^0.41.0", "drizzle-seed": "^0.3.1", - "graphile-export": "0.0.2-beta.26", + "graphile-export": "0.0.2-beta.24", "graphql": "^16.10.0", "graphql-yoga": "^5.13.2", "hono": "^4.7.5", @@ -169,7 +169,7 @@ "@graphile/pg-aggregates": ["@graphile/pg-aggregates@0.2.0-beta.7", "", { "peerDependencies": { "graphile-build": "^5.0.0-beta.27", "graphile-build-pg": "^5.0.0-beta.31", "graphql": "^16.1.0-experimental-stream-defer.6" }, "optionalPeers": ["graphile-build", "graphile-build-pg", "graphql"] }, "sha512-XaVAzlB1S1UzAmet7dZcoW3AnDGT2qrQqXCRIGJKeu7i76D/SIR5hZs+mytYOjfwuJsHsBBDtmlRORMaUKkJxw=="], - "@graphile/simplify-inflection": ["@graphile/simplify-inflection@8.0.0-beta.6", "", {}, "sha512-GFfQtUgX3yLj3XWY9vHrhOfkkCdoW2oqJgJdjQs3qYKqTHViKFch91NguUnw3z+4X1DgYb+qx10leTo+tZ+UeA=="], + "@graphile/simplify-inflection": ["@graphile/simplify-inflection@8.0.0-beta.5", "", {}, "sha512-1XaXGe5i5wRR/Uh2cvkt9KlFoXq/e7a3GYSdZtQnp68gIOdgcys2T24VNYsiekBhzcp5CCCcUJJdUvV2bvS21Q=="], "@graphql-tools/executor": ["@graphql-tools/executor@1.3.11", "", { "dependencies": { "@graphql-tools/utils": "^10.7.1", "@graphql-typed-document-node/core": "^3.2.0", "@repeaterjs/repeater": "^3.0.4", "@whatwg-node/disposablestack": "^0.0.5", "tslib": "^2.4.0", "value-or-promise": "^1.0.12" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-7Q1IwIuSgarDeaCOZ1VMZvGaWY7cD2jj+uTNn/PsenYYKqFWKH30UylEK67ZTpVMXqBJctFaxVnPP7KM0+LPWg=="], @@ -313,7 +313,7 @@ "graphile-config": ["graphile-config@0.0.1-beta.14", "", { "dependencies": { "@types/interpret": "^1.1.1", "@types/node": "^20.5.7", "@types/semver": "^7.5.1", "chalk": "^4.1.2", "debug": "^4.3.4", "interpret": "^3.1.1", "semver": "^7.5.4", "tslib": "^2.6.2", "yargs": "^17.7.2" } }, "sha512-3FlhyRKz4LvIbY4AXn4EI8DSTdSYsg0WRfX6U9QeytGta9aiefF1QqSiC1ocXUlNJUMBfm28dy0eL669ljYRwg=="], - "graphile-export": ["graphile-export@0.0.2-beta.26", "", { "dependencies": { "@babel/generator": "^7.25.6", "@babel/parser": "^7.25.6", "@babel/template": "^7.25.0", "@babel/traverse": "^7.25.6", "@babel/types": "^7.25.6", "@types/node": "^20.5.7", "prettier": "^3.0.3", "tslib": "^2.6.2" }, "peerDependencies": { "eslint": "^8.48.0", "grafast": "^0.1.1-beta.21", "pg-sql2": "^5.0.0-beta.8" }, "optionalPeers": ["eslint", "pg-sql2"] }, "sha512-F/VwojFj+UWKUcL5kiLeeYNLTKJzK19rC9rZO1Ga/4NVCAAx2azscocDKlpJE7W+LYcPwtZkYhESKwfLOts8zw=="], + "graphile-export": ["graphile-export@0.0.2-beta.24", "", { "dependencies": { "@babel/generator": "^7.25.6", "@babel/parser": "^7.25.6", "@babel/template": "^7.25.0", "@babel/traverse": "^7.25.6", "@babel/types": "^7.25.6", "@types/node": "^20.5.7", "prettier": "^3.0.3", "tslib": "^2.6.2" }, "peerDependencies": { "eslint": "^8.48.0", "grafast": "^0.1.1-beta.19", "pg-sql2": "^5.0.0-beta.7" }, "optionalPeers": ["eslint", "pg-sql2"] }, "sha512-nu24HgtCc2G5lfAK5EkzWcE6Vv9TTTJrzutTjnOVJ5Zbdp55XBPrk0y0TWJulGjcj3Do3y+gz0T9Ldzil89yxg=="], "graphile-utils": ["graphile-utils@5.0.0-beta.36", "", { "dependencies": { "debug": "^4.3.4", "json5": "^2.2.3", "tslib": "^2.6.2" }, "peerDependencies": { "@dataplan/pg": "^0.0.1-beta.30", "grafast": "^0.1.1-beta.19", "graphile-build": "^5.0.0-beta.31", "graphile-build-pg": "^5.0.0-beta.36", "graphile-config": "^0.0.1-beta.14", "graphql": "^16.1.0-experimental-stream-defer.6", "tamedevil": "^0.0.0-beta.7" }, "optionalPeers": ["@dataplan/pg", "graphile-build-pg"] }, "sha512-Bo3PEOzLhlcs/NtaTXb2XSVazQxkQzMLkaxY7f0GWMImMfPZJekJW5zcOKVYLeljjXnfCMGkYsYddvtcwbha5w=="], diff --git a/package.json b/package.json index afd767c..08ca35c 100644 --- a/package.json +++ b/package.json @@ -37,11 +37,11 @@ "@envelop/validation-cache": "^8.1.3", "@escape.tech/graphql-armor": "^3.1.2", "@graphile/pg-aggregates": "0.2.0-beta.7", - "@graphile/simplify-inflection": "8.0.0-beta.6", + "@graphile/simplify-inflection": "8.0.0-beta.5", "dayjs": "^1.11.13", "drizzle-orm": "^0.41.0", "drizzle-seed": "^0.3.1", - "graphile-export": "0.0.2-beta.26", + "graphile-export": "0.0.2-beta.24", "graphql": "^16.10.0", "graphql-yoga": "^5.13.2", "hono": "^4.7.5", diff --git a/src/generated/graphql/schema.executable.ts b/src/generated/graphql/schema.executable.ts index 218f021..326c0c5 100644 --- a/src/generated/graphql/schema.executable.ts +++ b/src/generated/graphql/schema.executable.ts @@ -34,8 +34,7 @@ const handler = { return constant`query`; } }; -const nodeIdCodecs = { - __proto__: null, +const nodeIdCodecs = Object.assign(Object.create(null), { raw: handler.codec, base64JSON: { name: "base64JSON", @@ -67,11 +66,10 @@ const nodeIdCodecs = { isSyncAndSafe: true }) } -}; -const nodeIdHandlerByTypeName = { - __proto__: null, +}); +const nodeIdHandlerByTypeName = Object.assign(Object.create(null), { Query: handler -}; +}); const executor = new PgExecutor({ name: "main", context() { @@ -86,8 +84,7 @@ const downvoteIdentifier = sql.identifier("public", "downvote"); const spec_downvote = { name: "downvote", identifier: downvoteIdentifier, - attributes: { - __proto__: null, + attributes: Object.assign(Object.create(null), { id: { description: undefined, codec: TYPES.uuid, @@ -148,7 +145,7 @@ const spec_downvote = { canUpdate: true } } - }, + }), description: undefined, extensions: { oid: "64252", @@ -158,9 +155,7 @@ const spec_downvote = { schemaName: "public", name: "downvote" }, - tags: { - __proto__: null - } + tags: Object.create(null) }, executor: executor }; @@ -169,8 +164,7 @@ const invitationIdentifier = sql.identifier("public", "invitation"); const spec_invitation = { name: "invitation", identifier: invitationIdentifier, - attributes: { - __proto__: null, + attributes: Object.assign(Object.create(null), { id: { description: undefined, codec: TYPES.uuid, @@ -231,7 +225,7 @@ const spec_invitation = { canUpdate: true } } - }, + }), description: undefined, extensions: { oid: "64351", @@ -241,9 +235,7 @@ const spec_invitation = { schemaName: "public", name: "invitation" }, - tags: { - __proto__: null - } + tags: Object.create(null) }, executor: executor }; @@ -252,8 +244,7 @@ const upvoteIdentifier = sql.identifier("public", "upvote"); const spec_upvote = { name: "upvote", identifier: upvoteIdentifier, - attributes: { - __proto__: null, + attributes: Object.assign(Object.create(null), { id: { description: undefined, codec: TYPES.uuid, @@ -314,7 +305,7 @@ const spec_upvote = { canUpdate: true } } - }, + }), description: undefined, extensions: { oid: "64165", @@ -324,9 +315,7 @@ const spec_upvote = { schemaName: "public", name: "upvote" }, - tags: { - __proto__: null - } + tags: Object.create(null) }, executor: executor }; @@ -335,8 +324,7 @@ const commentIdentifier = sql.identifier("public", "comment"); const spec_comment = { name: "comment", identifier: commentIdentifier, - attributes: { - __proto__: null, + attributes: Object.assign(Object.create(null), { id: { description: undefined, codec: TYPES.uuid, @@ -409,7 +397,7 @@ const spec_comment = { canUpdate: true } } - }, + }), description: undefined, extensions: { oid: "64232", @@ -419,9 +407,7 @@ const spec_comment = { schemaName: "public", name: "comment" }, - tags: { - __proto__: null - } + tags: Object.create(null) }, executor: executor }; @@ -430,8 +416,7 @@ const organizationIdentifier = sql.identifier("public", "organization"); const spec_organization = { name: "organization", identifier: organizationIdentifier, - attributes: { - __proto__: null, + attributes: Object.assign(Object.create(null), { id: { description: undefined, codec: TYPES.uuid, @@ -492,7 +477,7 @@ const spec_organization = { canUpdate: true } } - }, + }), description: undefined, extensions: { oid: "64127", @@ -502,9 +487,7 @@ const spec_organization = { schemaName: "public", name: "organization" }, - tags: { - __proto__: null - } + tags: Object.create(null) }, executor: executor }; @@ -513,8 +496,7 @@ const projectIdentifier = sql.identifier("public", "project"); const spec_project = { name: "project", identifier: projectIdentifier, - attributes: { - __proto__: null, + attributes: Object.assign(Object.create(null), { id: { description: undefined, codec: TYPES.uuid, @@ -611,7 +593,7 @@ const spec_project = { canUpdate: true } } - }, + }), description: undefined, extensions: { oid: "64151", @@ -621,9 +603,7 @@ const spec_project = { schemaName: "public", name: "project" }, - tags: { - __proto__: null - } + tags: Object.create(null) }, executor: executor }; @@ -632,8 +612,7 @@ const postIdentifier = sql.identifier("public", "post"); const spec_post = { name: "post", identifier: postIdentifier, - attributes: { - __proto__: null, + attributes: Object.assign(Object.create(null), { id: { description: undefined, codec: TYPES.uuid, @@ -742,7 +721,7 @@ const spec_post = { canUpdate: true } } - }, + }), description: undefined, extensions: { oid: "64141", @@ -752,9 +731,7 @@ const spec_post = { schemaName: "public", name: "post" }, - tags: { - __proto__: null - } + tags: Object.create(null) }, executor: executor }; @@ -771,17 +748,14 @@ const roleCodec = enumCodec({ schemaName: "public", name: "role" }, - tags: { - __proto__: null - } + tags: Object.create(null) } }); const memberIdentifier = sql.identifier("public", "member"); const spec_member = { name: "member", identifier: memberIdentifier, - attributes: { - __proto__: null, + attributes: Object.assign(Object.create(null), { user_id: { description: undefined, codec: TYPES.uuid, @@ -842,7 +816,7 @@ const spec_member = { canUpdate: true } } - }, + }), description: undefined, extensions: { oid: "64187", @@ -852,9 +826,7 @@ const spec_member = { schemaName: "public", name: "member" }, - tags: { - __proto__: null - } + tags: Object.create(null) }, executor: executor }; @@ -863,8 +835,7 @@ const postStatusIdentifier = sql.identifier("public", "post_status"); const spec_postStatus = { name: "postStatus", identifier: postStatusIdentifier, - attributes: { - __proto__: null, + attributes: Object.assign(Object.create(null), { id: { description: undefined, codec: TYPES.uuid, @@ -961,7 +932,7 @@ const spec_postStatus = { canUpdate: true } } - }, + }), description: undefined, extensions: { oid: "64325", @@ -971,9 +942,7 @@ const spec_postStatus = { schemaName: "public", name: "post_status" }, - tags: { - __proto__: null - } + tags: Object.create(null) }, executor: executor }; @@ -982,8 +951,7 @@ const userIdentifier = sql.identifier("public", "user"); const spec_user = { name: "user", identifier: userIdentifier, - attributes: { - __proto__: null, + attributes: Object.assign(Object.create(null), { id: { description: undefined, codec: TYPES.uuid, @@ -1080,7 +1048,7 @@ const spec_user = { canUpdate: true } } - }, + }), description: undefined, extensions: { oid: "64175", @@ -1090,9 +1058,7 @@ const spec_user = { schemaName: "public", name: "user" }, - tags: { - __proto__: null - } + tags: Object.create(null) }, executor: executor }; @@ -1103,19 +1069,16 @@ const downvoteUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: { - __proto__: null - } + tags: Object.create(null) } }, { isPrimary: false, attributes: ["post_id", "user_id"], description: undefined, extensions: { - tags: { - __proto__: null, + tags: Object.assign(Object.create(null), { behavior: ["-update", "-delete"] - } + }) } }]; const registryConfig_pgResources_downvote_downvote = { @@ -1149,19 +1112,16 @@ const invitationUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: { - __proto__: null - } + tags: Object.create(null) } }, { isPrimary: false, attributes: ["email"], description: undefined, extensions: { - tags: { - __proto__: null, + tags: Object.assign(Object.create(null), { behavior: ["-update", "-delete"] - } + }) } }]; const registryConfig_pgResources_invitation_invitation = { @@ -1195,19 +1155,16 @@ const upvoteUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: { - __proto__: null - } + tags: Object.create(null) } }, { isPrimary: false, attributes: ["post_id", "user_id"], description: undefined, extensions: { - tags: { - __proto__: null, + tags: Object.assign(Object.create(null), { behavior: ["-update", "-delete"] - } + }) } }]; const registryConfig_pgResources_upvote_upvote = { @@ -1241,9 +1198,7 @@ const commentUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: { - __proto__: null - } + tags: Object.create(null) } }]; const registryConfig_pgResources_comment_comment = { @@ -1277,19 +1232,16 @@ const organizationUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: { - __proto__: null - } + tags: Object.create(null) } }, { isPrimary: false, attributes: ["name"], description: undefined, extensions: { - tags: { - __proto__: null, + tags: Object.assign(Object.create(null), { behavior: ["-update", "-delete"] - } + }) } }]; const registryConfig_pgResources_organization_organization = { @@ -1323,9 +1275,7 @@ const projectUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: { - __proto__: null - } + tags: Object.create(null) } }]; const registryConfig_pgResources_project_project = { @@ -1359,9 +1309,7 @@ const postUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: { - __proto__: null - } + tags: Object.create(null) } }]; const registryConfig_pgResources_post_post = { @@ -1395,9 +1343,7 @@ const post_statusUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: { - __proto__: null - } + tags: Object.create(null) } }]; const registryConfig_pgResources_post_status_post_status = { @@ -1431,39 +1377,34 @@ const userUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: { - __proto__: null - } + tags: Object.create(null) } }, { isPrimary: false, attributes: ["email"], description: undefined, extensions: { - tags: { - __proto__: null, + tags: Object.assign(Object.create(null), { behavior: ["-update", "-delete"] - } + }) } }, { isPrimary: false, attributes: ["hidra_id"], description: undefined, extensions: { - tags: { - __proto__: null, + tags: Object.assign(Object.create(null), { behavior: ["-update", "-delete"] - } + }) } }, { isPrimary: false, attributes: ["username"], description: undefined, extensions: { - tags: { - __proto__: null, + tags: Object.assign(Object.create(null), { behavior: ["-update", "-delete"] - } + }) } }]; const registryConfig_pgResources_user_user = { @@ -1497,19 +1438,16 @@ const memberUniques = [{ attributes: ["id"], description: undefined, extensions: { - tags: { - __proto__: null - } + tags: Object.create(null) } }, { isPrimary: false, attributes: ["user_id", "organization_id"], description: undefined, extensions: { - tags: { - __proto__: null, + tags: Object.assign(Object.create(null), { behavior: ["-update", "-delete"] - } + }) } }]; const registryConfig_pgResources_member_member = { @@ -1539,12 +1477,10 @@ const registryConfig_pgResources_member_member = { } }; const registryConfig = { - pgExecutors: { - __proto__: null, + pgExecutors: Object.assign(Object.create(null), { main: executor - }, - pgCodecs: { - __proto__: null, + }), + pgCodecs: Object.assign(Object.create(null), { text: TYPES.text, downvote: downvoteCodec, uuid: TYPES.uuid, @@ -1560,9 +1496,8 @@ const registryConfig = { member: memberCodec, postStatus: postStatusCodec, user: userCodec - }, - pgResources: { - __proto__: null, + }), + pgResources: Object.assign(Object.create(null), { f_unaccent: { executor, name: "f_unaccent", @@ -1602,11 +1537,9 @@ const registryConfig = { post_status: registryConfig_pgResources_post_status_post_status, user: registryConfig_pgResources_user_user, member: registryConfig_pgResources_member_member - }, - pgRelations: { - __proto__: null, - comment: { - __proto__: null, + }), + pgRelations: Object.assign(Object.create(null), { + comment: Object.assign(Object.create(null), { postByMyPostId: { localCodec: commentCodec, remoteResourceOptions: registryConfig_pgResources_post_post, @@ -1637,9 +1570,8 @@ const registryConfig = { } } } - }, - downvote: { - __proto__: null, + }), + downvote: Object.assign(Object.create(null), { postByMyPostId: { localCodec: downvoteCodec, remoteResourceOptions: registryConfig_pgResources_post_post, @@ -1670,9 +1602,8 @@ const registryConfig = { } } } - }, - invitation: { - __proto__: null, + }), + invitation: Object.assign(Object.create(null), { organizationByMyOrganizationId: { localCodec: invitationCodec, remoteResourceOptions: registryConfig_pgResources_organization_organization, @@ -1688,9 +1619,8 @@ const registryConfig = { } } } - }, - member: { - __proto__: null, + }), + member: Object.assign(Object.create(null), { organizationByMyOrganizationId: { localCodec: memberCodec, remoteResourceOptions: registryConfig_pgResources_organization_organization, @@ -1721,9 +1651,8 @@ const registryConfig = { } } } - }, - organization: { - __proto__: null, + }), + organization: Object.assign(Object.create(null), { projectsByTheirOrganizationId: { localCodec: organizationCodec, remoteResourceOptions: registryConfig_pgResources_project_project, @@ -1769,9 +1698,8 @@ const registryConfig = { } } } - }, - post: { - __proto__: null, + }), + post: Object.assign(Object.create(null), { projectByMyProjectId: { localCodec: postCodec, remoteResourceOptions: registryConfig_pgResources_project_project, @@ -1862,9 +1790,8 @@ const registryConfig = { } } } - }, - postStatus: { - __proto__: null, + }), + postStatus: Object.assign(Object.create(null), { projectByMyProjectId: { localCodec: postStatusCodec, remoteResourceOptions: registryConfig_pgResources_project_project, @@ -1895,9 +1822,8 @@ const registryConfig = { } } } - }, - project: { - __proto__: null, + }), + project: Object.assign(Object.create(null), { organizationByMyOrganizationId: { localCodec: projectCodec, remoteResourceOptions: registryConfig_pgResources_organization_organization, @@ -1943,9 +1869,8 @@ const registryConfig = { } } } - }, - upvote: { - __proto__: null, + }), + upvote: Object.assign(Object.create(null), { postByMyPostId: { localCodec: upvoteCodec, remoteResourceOptions: registryConfig_pgResources_post_post, @@ -1976,9 +1901,8 @@ const registryConfig = { } } } - }, - user: { - __proto__: null, + }), + user: Object.assign(Object.create(null), { postsByTheirUserId: { localCodec: userCodec, remoteResourceOptions: registryConfig_pgResources_post_post, @@ -2054,8 +1978,8 @@ const registryConfig = { } } } - } - } + }) + }) }; const registry = makeRegistry(registryConfig); const resource_downvotePgResource = registry.pgResources["downvote"]; @@ -2110,21 +2034,6 @@ const makeArgs = (args, path = []) => { return selectArgs; }; const resource_f_unaccentPgResource = registry.pgResources["f_unaccent"]; -function Query_downvotesfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Query_downvoteslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Query_downvotesoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Query_downvotesbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Query_downvotesafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} const applyOrderToPlan = ($select, $value, TableOrderByType) => { if (!("evalLength" in $value)) return; const length = $value.evalLength(); @@ -2140,15 +2049,6 @@ const applyOrderToPlan = ($select, $value, TableOrderByType) => { plan($select); } }; -function Query_downvotesorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); - return null; -} -const Query_downvotesconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2161,35 +2061,6 @@ function assertAllowed(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Query_downvotesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Query_invitationsfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Query_invitationslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Query_invitationsoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Query_invitationsbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Query_invitationsafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Query_invitationsorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); - return null; -} -const Query_invitationsconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed2(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2202,35 +2073,6 @@ function assertAllowed2(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Query_invitationsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed2(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Query_upvotesfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Query_upvoteslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Query_upvotesoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Query_upvotesbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Query_upvotesafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Query_upvotesorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); - return null; -} -const Query_upvotesconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed3(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2243,35 +2085,6 @@ function assertAllowed3(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Query_upvotesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed3(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Query_commentsfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Query_commentslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Query_commentsoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Query_commentsbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Query_commentsafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Query_commentsorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); - return null; -} -const Query_commentsconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed4(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2284,35 +2097,6 @@ function assertAllowed4(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Query_commentsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed4(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Query_organizationsfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Query_organizationslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Query_organizationsoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Query_organizationsbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Query_organizationsafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Query_organizationsorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); - return null; -} -const Query_organizationsconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed5(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2325,35 +2109,6 @@ function assertAllowed5(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Query_organizationsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed5(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Query_projectsfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Query_projectslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Query_projectsoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Query_projectsbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Query_projectsafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Query_projectsorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); - return null; -} -const Query_projectsconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed6(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2366,35 +2121,6 @@ function assertAllowed6(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Query_projectsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed6(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Query_postsfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Query_postslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Query_postsoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Query_postsbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Query_postsafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Query_postsorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); - return null; -} -const Query_postsconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed7(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2407,35 +2133,6 @@ function assertAllowed7(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Query_postsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed7(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Query_postStatusesfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Query_postStatuseslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Query_postStatusesoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Query_postStatusesbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Query_postStatusesafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Query_postStatusesorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); - return null; -} -const Query_postStatusesconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed8(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2448,35 +2145,6 @@ function assertAllowed8(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Query_postStatusesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed8(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Query_usersfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Query_userslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Query_usersoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Query_usersbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Query_usersafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Query_usersorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); - return null; -} -const Query_usersconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed9(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2489,35 +2157,6 @@ function assertAllowed9(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Query_usersfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed9(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Query_membersfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Query_memberslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Query_membersoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Query_membersbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Query_membersafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Query_membersorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); - return null; -} -const Query_membersconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed10(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2530,11 +2169,6 @@ function assertAllowed10(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Query_membersfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed10(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} function UUIDSerialize(value) { return "" + value; } @@ -2542,30 +2176,6 @@ const coerce = string => { if (!/^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$/i.test(string)) throw new GraphQLError("Invalid UUID, expected 32 hexadecimal characters, optionally with hypens"); return string; }; -function Post_upvotesfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Post_upvoteslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Post_upvotesoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Post_upvotesbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Post_upvotesafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Post_upvotesorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); - return null; -} -const Post_upvotesconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed11(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2578,35 +2188,6 @@ function assertAllowed11(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Post_upvotesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed11(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Post_commentsfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Post_commentslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Post_commentsoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Post_commentsbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Post_commentsafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Post_commentsorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); - return null; -} -const Post_commentsconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed12(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2619,35 +2200,6 @@ function assertAllowed12(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Post_commentsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed12(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Post_downvotesfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Post_downvoteslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Post_downvotesoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Post_downvotesbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Post_downvotesafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Post_downvotesorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); - return null; -} -const Post_downvotesconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed13(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2660,35 +2212,6 @@ function assertAllowed13(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Post_downvotesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed13(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Project_postsfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Project_postslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Project_postsoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Project_postsbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Project_postsafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Project_postsorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); - return null; -} -const Project_postsconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed14(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2701,35 +2224,6 @@ function assertAllowed14(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Project_postsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed14(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Project_postStatusesfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Project_postStatuseslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Project_postStatusesoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Project_postStatusesbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Project_postStatusesafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Project_postStatusesorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); - return null; -} -const Project_postStatusesconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed15(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2742,35 +2236,6 @@ function assertAllowed15(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Project_postStatusesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed15(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Organization_projectsfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Organization_projectslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Organization_projectsoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Organization_projectsbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Organization_projectsafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Organization_projectsorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); - return null; -} -const Organization_projectsconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed16(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2783,35 +2248,6 @@ function assertAllowed16(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Organization_projectsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed16(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Organization_membersfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Organization_memberslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Organization_membersoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Organization_membersbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Organization_membersafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Organization_membersorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); - return null; -} -const Organization_membersconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed17(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2824,35 +2260,6 @@ function assertAllowed17(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Organization_membersfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed17(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function Organization_invitationsfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function Organization_invitationslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function Organization_invitationsoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function Organization_invitationsbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function Organization_invitationsafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function Organization_invitationsorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); - return null; -} -const Organization_invitationsconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed18(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -2865,11 +2272,6 @@ function assertAllowed18(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function Organization_invitationsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed18(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} function ProjectGroupBy_extensions_grafast_applyPlan($pgSelect) { $pgSelect.groupBy({ fragment: sql.fragment`${$pgSelect.alias}.${sql.identifier("name")}` @@ -2946,123 +2348,97 @@ function ProjectGroupBy_extensions_grafast_applyPlan11($pgSelect) { export const ProjectGroupBy = new GraphQLEnumType({ name: "ProjectGroupBy", description: "Grouping methods for `Project` for usage during aggregation.", - values: { - __proto__: null, + values: Object.assign(Object.create(null), { NAME: { value: "NAME", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan } - } + }) }, IMAGE: { value: "IMAGE", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan2 } - } + }) }, DESCRIPTION: { value: "DESCRIPTION", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan3 } - } + }) }, ORGANIZATION_ID: { value: "ORGANIZATION_ID", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan4 } - } + }) }, CREATED_AT: { value: "CREATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan5 } - } + }) }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan6 } - } + }) }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan7 } - } + }) }, UPDATED_AT: { value: "UPDATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan8 } - } + }) }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan9 } - } + }) }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan10 } - } + }) }, SLUG: { value: "SLUG", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: ProjectGroupBy_extensions_grafast_applyPlan11 } - } + }) } - } + }) }); -function ProjectConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(ProjectGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; -} -function ProjectConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); -} const dataTypeToAggregateTypeMap = {}; const spec = { id: "distinctCount", @@ -4666,102 +4042,57 @@ function MemberGroupBy_extensions_grafast_applyPlan6($pgSelect) { export const MemberGroupBy = new GraphQLEnumType({ name: "MemberGroupBy", description: "Grouping methods for `Member` for usage during aggregation.", - values: { - __proto__: null, + values: Object.assign(Object.create(null), { USER_ID: { value: "USER_ID", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: MemberGroupBy_extensions_grafast_applyPlan } - } + }) }, ORGANIZATION_ID: { value: "ORGANIZATION_ID", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: MemberGroupBy_extensions_grafast_applyPlan2 } - } + }) }, CREATED_AT: { value: "CREATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: MemberGroupBy_extensions_grafast_applyPlan3 } - } + }) }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: MemberGroupBy_extensions_grafast_applyPlan4 } - } + }) }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: MemberGroupBy_extensions_grafast_applyPlan5 } - } + }) }, ROLE: { value: "ROLE", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: MemberGroupBy_extensions_grafast_applyPlan6 } - } + }) } - } + }) }); -function MemberConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(MemberGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; -} -function MemberConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); -} -function User_postsfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function User_postslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function User_postsoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function User_postsbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function User_postsafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function User_postsorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); - return null; -} -const User_postsconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed56(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -4774,35 +4105,6 @@ function assertAllowed56(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function User_postsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed56(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function User_upvotesfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function User_upvoteslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function User_upvotesoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function User_upvotesbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function User_upvotesafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function User_upvotesorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); - return null; -} -const User_upvotesconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed57(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -4815,35 +4117,6 @@ function assertAllowed57(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function User_upvotesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed57(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function User_membersfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function User_memberslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function User_membersoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function User_membersbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function User_membersafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function User_membersorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); - return null; -} -const User_membersconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed58(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -4856,35 +4129,6 @@ function assertAllowed58(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function User_membersfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed58(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function User_commentsfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function User_commentslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function User_commentsoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function User_commentsbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function User_commentsafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function User_commentsorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); - return null; -} -const User_commentsconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed59(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -4897,35 +4141,6 @@ function assertAllowed59(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function User_commentsfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed59(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} -function User_downvotesfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function User_downvoteslastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function User_downvotesoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function User_downvotesbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function User_downvotesafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function User_downvotesorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); - return null; -} -const User_downvotesconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed60(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -4938,11 +4153,6 @@ function assertAllowed60(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function User_downvotesfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed60(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} function PostGroupBy_extensions_grafast_applyPlan($pgSelect) { $pgSelect.groupBy({ fragment: sql.fragment`${$pgSelect.alias}.${sql.identifier("title")}` @@ -5016,150 +4226,121 @@ function PostGroupBy_extensions_grafast_applyPlan14($pgSelect) { export const PostGroupBy = new GraphQLEnumType({ name: "PostGroupBy", description: "Grouping methods for `Post` for usage during aggregation.", - values: { - __proto__: null, + values: Object.assign(Object.create(null), { TITLE: { value: "TITLE", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan } - } + }) }, DESCRIPTION: { value: "DESCRIPTION", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan2 } - } + }) }, PROJECT_ID: { value: "PROJECT_ID", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan3 } - } + }) }, USER_ID: { value: "USER_ID", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan4 } - } + }) }, CREATED_AT: { value: "CREATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan5 } - } + }) }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan6 } - } + }) }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan7 } - } + }) }, UPDATED_AT: { value: "UPDATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan8 } - } + }) }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan9 } - } + }) }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan10 } - } + }) }, STATUS_ID: { value: "STATUS_ID", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan11 } - } + }) }, STATUS_UPDATED_AT: { value: "STATUS_UPDATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan12 } - } + }) }, STATUS_UPDATED_AT_TRUNCATED_TO_HOUR: { value: "STATUS_UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan13 } - } + }) }, STATUS_UPDATED_AT_TRUNCATED_TO_DAY: { value: "STATUS_UPDATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostGroupBy_extensions_grafast_applyPlan14 } - } + }) } - } + }) }); -function PostConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(PostGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; -} -function PostConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); -} const relation3 = registry.pgRelations["post"]["upvotesByTheirPostId"]; const relation4 = registry.pgRelations["post"]["commentsByTheirPostId"]; const relation5 = registry.pgRelations["post"]["downvotesByTheirPostId"]; @@ -5206,96 +4387,73 @@ function UpvoteGroupBy_extensions_grafast_applyPlan8($pgSelect) { export const UpvoteGroupBy = new GraphQLEnumType({ name: "UpvoteGroupBy", description: "Grouping methods for `Upvote` for usage during aggregation.", - values: { - __proto__: null, + values: Object.assign(Object.create(null), { POST_ID: { value: "POST_ID", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan } - } + }) }, USER_ID: { value: "USER_ID", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan2 } - } + }) }, CREATED_AT: { value: "CREATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan3 } - } + }) }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan4 } - } + }) }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan5 } - } + }) }, UPDATED_AT: { value: "UPDATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan6 } - } + }) }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan7 } - } + }) }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UpvoteGroupBy_extensions_grafast_applyPlan8 } - } + }) } - } + }) }); -function UpvoteConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(UpvoteGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; -} -function UpvoteConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); -} function CommentGroupBy_extensions_grafast_applyPlan($pgSelect) { $pgSelect.groupBy({ fragment: sql.fragment`${$pgSelect.alias}.${sql.identifier("message")}` @@ -5344,105 +4502,81 @@ function CommentGroupBy_extensions_grafast_applyPlan9($pgSelect) { export const CommentGroupBy = new GraphQLEnumType({ name: "CommentGroupBy", description: "Grouping methods for `Comment` for usage during aggregation.", - values: { - __proto__: null, + values: Object.assign(Object.create(null), { MESSAGE: { value: "MESSAGE", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan } - } + }) }, POST_ID: { value: "POST_ID", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan2 } - } + }) }, USER_ID: { value: "USER_ID", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan3 } - } + }) }, CREATED_AT: { value: "CREATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan4 } - } + }) }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan5 } - } + }) }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan6 } - } + }) }, UPDATED_AT: { value: "UPDATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan7 } - } + }) }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan8 } - } + }) }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: CommentGroupBy_extensions_grafast_applyPlan9 } - } + }) } - } + }) }); -function CommentConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(CommentGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; -} -function CommentConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); -} function DownvoteGroupBy_extensions_grafast_applyPlan($pgSelect) { $pgSelect.groupBy({ fragment: sql.fragment`${$pgSelect.alias}.${sql.identifier("post_id")}` @@ -5486,96 +4620,73 @@ function DownvoteGroupBy_extensions_grafast_applyPlan8($pgSelect) { export const DownvoteGroupBy = new GraphQLEnumType({ name: "DownvoteGroupBy", description: "Grouping methods for `Downvote` for usage during aggregation.", - values: { - __proto__: null, + values: Object.assign(Object.create(null), { POST_ID: { value: "POST_ID", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan } - } + }) }, USER_ID: { value: "USER_ID", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan2 } - } + }) }, CREATED_AT: { value: "CREATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan3 } - } + }) }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan4 } - } + }) }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan5 } - } + }) }, UPDATED_AT: { value: "UPDATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan6 } - } + }) }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan7 } - } + }) }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: DownvoteGroupBy_extensions_grafast_applyPlan8 } - } + }) } - } + }) }); -function DownvoteConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(DownvoteGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; -} -function DownvoteConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); -} function InvitationGroupBy_extensions_grafast_applyPlan($pgSelect) { $pgSelect.groupBy({ fragment: sql.fragment`${$pgSelect.alias}.${sql.identifier("organization_id")}` @@ -5614,87 +4725,65 @@ function InvitationGroupBy_extensions_grafast_applyPlan7($pgSelect) { export const InvitationGroupBy = new GraphQLEnumType({ name: "InvitationGroupBy", description: "Grouping methods for `Invitation` for usage during aggregation.", - values: { - __proto__: null, + values: Object.assign(Object.create(null), { ORGANIZATION_ID: { value: "ORGANIZATION_ID", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: InvitationGroupBy_extensions_grafast_applyPlan } - } + }) }, CREATED_AT: { value: "CREATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: InvitationGroupBy_extensions_grafast_applyPlan2 } - } + }) }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: InvitationGroupBy_extensions_grafast_applyPlan3 } - } + }) }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: InvitationGroupBy_extensions_grafast_applyPlan4 } - } + }) }, UPDATED_AT: { value: "UPDATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: InvitationGroupBy_extensions_grafast_applyPlan5 } - } + }) }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: InvitationGroupBy_extensions_grafast_applyPlan6 } - } + }) }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: InvitationGroupBy_extensions_grafast_applyPlan7 } - } + }) } - } + }) }); -function InvitationConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(InvitationGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; -} -function InvitationConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); -} function PostStatusGroupBy_extensions_grafast_applyPlan($pgSelect) { $pgSelect.groupBy({ fragment: sql.fragment`${$pgSelect.alias}.${sql.identifier("status")}` @@ -5753,147 +4842,97 @@ function PostStatusGroupBy_extensions_grafast_applyPlan11($pgSelect) { export const PostStatusGroupBy = new GraphQLEnumType({ name: "PostStatusGroupBy", description: "Grouping methods for `PostStatus` for usage during aggregation.", - values: { - __proto__: null, + values: Object.assign(Object.create(null), { STATUS: { value: "STATUS", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan } - } + }) }, DESCRIPTION: { value: "DESCRIPTION", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan2 } - } + }) }, COLOR: { value: "COLOR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan3 } - } + }) }, PROJECT_ID: { value: "PROJECT_ID", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan4 } - } + }) }, IS_DEFAULT: { value: "IS_DEFAULT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan5 } - } + }) }, CREATED_AT: { value: "CREATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan6 } - } + }) }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan7 } - } + }) }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan8 } - } + }) }, UPDATED_AT: { value: "UPDATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan9 } - } + }) }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan10 } - } + }) }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: PostStatusGroupBy_extensions_grafast_applyPlan11 } - } + }) } - } + }) }); -function PostStatusConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(PostStatusGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; -} -function PostStatusConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); -} -function PostStatus_postsByStatusIdfirstautoApplyAfterParentPlan(_, $connection, arg) { - $connection.setFirst(arg.getRaw()); -} -function PostStatus_postsByStatusIdlastautoApplyAfterParentPlan(_, $connection, val) { - $connection.setLast(val.getRaw()); -} -function PostStatus_postsByStatusIdoffsetautoApplyAfterParentPlan(_, $connection, val) { - $connection.setOffset(val.getRaw()); -} -function PostStatus_postsByStatusIdbeforeautoApplyAfterParentPlan(_, $connection, val) { - $connection.setBefore(val.getRaw()); -} -function PostStatus_postsByStatusIdafterautoApplyAfterParentPlan(_, $connection, val) { - $connection.setAfter(val.getRaw()); -} -function PostStatus_postsByStatusIdorderByautoApplyAfterParentPlan(_, $connection, val, info) { - const $value = val.getRaw(), - $select = $connection.getSubplan(); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); - return null; -} -const PostStatus_postsByStatusIdconditionautoApplyAfterParentPlan = (_condition, $connection) => { - return $connection.getSubplan().wherePlan(); -}; function assertAllowed61(fieldArgs, mode) { const $raw = fieldArgs.getRaw(); if (mode === "object" && !false && "evalIsEmpty" in $raw && $raw.evalIsEmpty()) throw Object.assign(new Error("Empty objects are forbidden in filter argument input."), {}); @@ -5906,11 +4945,6 @@ function assertAllowed61(fieldArgs, mode) { } if (!false && $raw.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); } -function PostStatus_postsByStatusIdfilterautoApplyAfterParentPlan(_, $connection, fieldArgs) { - assertAllowed61(fieldArgs, "object"); - const $where = $connection.getSubplan().wherePlan(); - fieldArgs.apply($where); -} const relation6 = registry.pgRelations["postStatus"]["postsByTheirStatusId"]; function OrganizationGroupBy_extensions_grafast_applyPlan($pgSelect) { $pgSelect.groupBy({ @@ -5950,87 +4984,65 @@ function OrganizationGroupBy_extensions_grafast_applyPlan7($pgSelect) { export const OrganizationGroupBy = new GraphQLEnumType({ name: "OrganizationGroupBy", description: "Grouping methods for `Organization` for usage during aggregation.", - values: { - __proto__: null, + values: Object.assign(Object.create(null), { CREATED_AT: { value: "CREATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: OrganizationGroupBy_extensions_grafast_applyPlan } - } + }) }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: OrganizationGroupBy_extensions_grafast_applyPlan2 } - } + }) }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: OrganizationGroupBy_extensions_grafast_applyPlan3 } - } + }) }, UPDATED_AT: { value: "UPDATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: OrganizationGroupBy_extensions_grafast_applyPlan4 } - } + }) }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: OrganizationGroupBy_extensions_grafast_applyPlan5 } - } + }) }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: OrganizationGroupBy_extensions_grafast_applyPlan6 } - } + }) }, SLUG: { value: "SLUG", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: OrganizationGroupBy_extensions_grafast_applyPlan7 } - } + }) } - } + }) }); -function OrganizationConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(OrganizationGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; -} -function OrganizationConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); -} const relation7 = registry.pgRelations["organization"]["projectsByTheirOrganizationId"]; const relation8 = registry.pgRelations["organization"]["membersByTheirOrganizationId"]; const relation9 = registry.pgRelations["organization"]["invitationsByTheirOrganizationId"]; @@ -6077,116 +5089,78 @@ function UserGroupBy_extensions_grafast_applyPlan8($pgSelect) { export const UserGroupBy = new GraphQLEnumType({ name: "UserGroupBy", description: "Grouping methods for `User` for usage during aggregation.", - values: { - __proto__: null, + values: Object.assign(Object.create(null), { CREATED_AT: { value: "CREATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan } - } + }) }, CREATED_AT_TRUNCATED_TO_HOUR: { value: "CREATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan2 } - } + }) }, CREATED_AT_TRUNCATED_TO_DAY: { value: "CREATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan3 } - } + }) }, UPDATED_AT: { value: "UPDATED_AT", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan4 } - } + }) }, UPDATED_AT_TRUNCATED_TO_HOUR: { value: "UPDATED_AT_TRUNCATED_TO_HOUR", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan5 } - } + }) }, UPDATED_AT_TRUNCATED_TO_DAY: { value: "UPDATED_AT_TRUNCATED_TO_DAY", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan6 } - } + }) }, FIRST_NAME: { value: "FIRST_NAME", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan7 } - } + }) }, LAST_NAME: { value: "LAST_NAME", - extensions: { - __proto__: null, + extensions: Object.assign(Object.create(null), { grafast: { applyPlan: UserGroupBy_extensions_grafast_applyPlan8 } - } + }) } - } + }) }); -function UserConnection_groupedAggregatesgroupByautoApplyAfterParentPlan(_$parent, $pgSelect, input) { - var _a, _b; - const val = input.getRaw().eval(); - if (!Array.isArray(val)) throw new Error("Invalid!"); - for (const group of val) { - const config = getEnumValueConfig(UserGroupBy, group), - plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; - if (typeof plan === "function") plan($pgSelect); - } - return null; -} -function UserConnection_groupedAggregateshavingautoApplyAfterParentPlan(_$parent, $pgSelect) { - return $pgSelect.havingPlan(); -} const relation10 = registry.pgRelations["user"]["postsByTheirUserId"]; const relation11 = registry.pgRelations["user"]["upvotesByTheirUserId"]; const relation12 = registry.pgRelations["user"]["membersByTheirUserId"]; const relation13 = registry.pgRelations["user"]["commentsByTheirUserId"]; const relation14 = registry.pgRelations["user"]["downvotesByTheirUserId"]; -function Mutation_createDownvoteinputautoApplyAfterParentPlan(_, $object) { - return $object; -} -function Mutation_createInvitationinputautoApplyAfterParentPlan(_, $object) { - return $object; -} -function Mutation_createUpvoteinputautoApplyAfterParentPlan(_, $object) { - return $object; -} -function Mutation_createCommentinputautoApplyAfterParentPlan(_, $object) { - return $object; -} -function Mutation_createOrganizationinputautoApplyAfterParentPlan(_, $object) { - return $object; -} function oldPlan(_, args) { const plan = object({ result: pgInsertSingle(resource_projectPgResource, Object.create(null)) @@ -6216,12 +5190,6 @@ const planWrapper = (plan, _, fieldArgs) => { }); return plan(); }; -function Mutation_createProjectinputautoApplyAfterParentPlan(_, $object) { - return $object; -} -function Mutation_createPostinputautoApplyAfterParentPlan(_, $object) { - return $object; -} function oldPlan2(_, args) { const plan = object({ result: pgInsertSingle(resource_post_statusPgResource, Object.create(null)) @@ -6255,12 +5223,6 @@ const planWrapper2 = (plan, _, fieldArgs) => { }); return plan(); }; -function Mutation_createPostStatusinputautoApplyAfterParentPlan(_, $object) { - return $object; -} -function Mutation_createUserinputautoApplyAfterParentPlan(_, $object) { - return $object; -} function oldPlan3(_, args) { const plan = object({ result: pgInsertSingle(resource_memberPgResource, Object.create(null)) @@ -6302,9 +5264,6 @@ const planWrapper3 = (plan, _, fieldArgs) => { }); return plan(); }; -function Mutation_createMemberinputautoApplyAfterParentPlan(_, $object) { - return $object; -} const oldPlan4 = (_$root, args) => { const plan = object({ result: pgUpdateSingle(resource_downvotePgResource, { @@ -12857,105 +11816,208 @@ export const plans = { const specifier = handler.plan($parent); return lambda(specifier, nodeIdCodecs[handler.codec.name].encode); }, - node(_$root, args) { - return node(nodeIdHandlerByTypeName, args.get("id")); + node: { + plan(_$root, args) { + return node(nodeIdHandlerByTypeName, args.get("id")); + }, + args: { + id: undefined + } }, - downvote(_$root, args) { - return resource_downvotePgResource.get({ - id: args.get("rowId") - }); + downvote: { + plan(_$root, args) { + return resource_downvotePgResource.get({ + id: args.get("rowId") + }); + }, + args: { + rowId: undefined + } }, - downvoteByPostIdAndUserId(_$root, args) { - return resource_downvotePgResource.get({ - post_id: args.get("postId"), - user_id: args.get("userId") - }); + downvoteByPostIdAndUserId: { + plan(_$root, args) { + return resource_downvotePgResource.get({ + post_id: args.get("postId"), + user_id: args.get("userId") + }); + }, + args: { + postId: undefined, + userId: undefined + } }, - invitation(_$root, args) { - return resource_invitationPgResource.get({ - id: args.get("rowId") - }); + invitation: { + plan(_$root, args) { + return resource_invitationPgResource.get({ + id: args.get("rowId") + }); + }, + args: { + rowId: undefined + } }, - invitationByEmail(_$root, args) { - return resource_invitationPgResource.get({ - email: args.get("email") - }); + invitationByEmail: { + plan(_$root, args) { + return resource_invitationPgResource.get({ + email: args.get("email") + }); + }, + args: { + email: undefined + } }, - upvote(_$root, args) { - return resource_upvotePgResource.get({ - id: args.get("rowId") - }); + upvote: { + plan(_$root, args) { + return resource_upvotePgResource.get({ + id: args.get("rowId") + }); + }, + args: { + rowId: undefined + } }, - upvoteByPostIdAndUserId(_$root, args) { - return resource_upvotePgResource.get({ - post_id: args.get("postId"), - user_id: args.get("userId") - }); + upvoteByPostIdAndUserId: { + plan(_$root, args) { + return resource_upvotePgResource.get({ + post_id: args.get("postId"), + user_id: args.get("userId") + }); + }, + args: { + postId: undefined, + userId: undefined + } }, - comment(_$root, args) { - return resource_commentPgResource.get({ - id: args.get("rowId") - }); + comment: { + plan(_$root, args) { + return resource_commentPgResource.get({ + id: args.get("rowId") + }); + }, + args: { + rowId: undefined + } }, - organization(_$root, args) { - return resource_organizationPgResource.get({ - id: args.get("rowId") - }); + organization: { + plan(_$root, args) { + return resource_organizationPgResource.get({ + id: args.get("rowId") + }); + }, + args: { + rowId: undefined + } }, - organizationByName(_$root, args) { - return resource_organizationPgResource.get({ - name: args.get("name") - }); + organizationByName: { + plan(_$root, args) { + return resource_organizationPgResource.get({ + name: args.get("name") + }); + }, + args: { + name: undefined + } }, - project(_$root, args) { - return resource_projectPgResource.get({ - id: args.get("rowId") - }); + project: { + plan(_$root, args) { + return resource_projectPgResource.get({ + id: args.get("rowId") + }); + }, + args: { + rowId: undefined + } }, - post(_$root, args) { - return resource_postPgResource.get({ - id: args.get("rowId") - }); + post: { + plan(_$root, args) { + return resource_postPgResource.get({ + id: args.get("rowId") + }); + }, + args: { + rowId: undefined + } }, - postStatus(_$root, args) { - return resource_post_statusPgResource.get({ - id: args.get("rowId") - }); + postStatus: { + plan(_$root, args) { + return resource_post_statusPgResource.get({ + id: args.get("rowId") + }); + }, + args: { + rowId: undefined + } }, - user(_$root, args) { - return resource_userPgResource.get({ - id: args.get("rowId") - }); + user: { + plan(_$root, args) { + return resource_userPgResource.get({ + id: args.get("rowId") + }); + }, + args: { + rowId: undefined + } }, - userByEmail(_$root, args) { - return resource_userPgResource.get({ - email: args.get("email") - }); + userByEmail: { + plan(_$root, args) { + return resource_userPgResource.get({ + email: args.get("email") + }); + }, + args: { + email: undefined + } }, - userByHidraId(_$root, args) { - return resource_userPgResource.get({ - hidra_id: args.get("hidraId") - }); + userByHidraId: { + plan(_$root, args) { + return resource_userPgResource.get({ + hidra_id: args.get("hidraId") + }); + }, + args: { + hidraId: undefined + } }, - userByUsername(_$root, args) { - return resource_userPgResource.get({ - username: args.get("username") - }); + userByUsername: { + plan(_$root, args) { + return resource_userPgResource.get({ + username: args.get("username") + }); + }, + args: { + username: undefined + } }, - member(_$root, args) { - return resource_memberPgResource.get({ - id: args.get("rowId") - }); + member: { + plan(_$root, args) { + return resource_memberPgResource.get({ + id: args.get("rowId") + }); + }, + args: { + rowId: undefined + } }, - memberByUserIdAndOrganizationId(_$root, args) { - return resource_memberPgResource.get({ - user_id: args.get("userId"), - organization_id: args.get("organizationId") - }); + memberByUserIdAndOrganizationId: { + plan(_$root, args) { + return resource_memberPgResource.get({ + user_id: args.get("userId"), + organization_id: args.get("organizationId") + }); + }, + args: { + userId: undefined, + organizationId: undefined + } }, - fUnaccent($root, args, _info) { - const selectArgs = makeArgs(args); - return resource_f_unaccentPgResource.execute(selectArgs); + fUnaccent: { + plan($root, args, _info) { + const selectArgs = makeArgs(args); + return resource_f_unaccentPgResource.execute(selectArgs); + }, + args: { + arg0: undefined + } }, downvotes: { plan() { @@ -12963,36 +12025,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Query_downvotesfirstautoApplyAfterParentPlan, - applyPlan: Query_downvotesfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Query_downvoteslastautoApplyAfterParentPlan, - applyPlan: Query_downvoteslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Query_downvotesoffsetautoApplyAfterParentPlan, - applyPlan: Query_downvotesoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Query_downvotesbeforeautoApplyAfterParentPlan, - applyPlan: Query_downvotesbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Query_downvotesafterautoApplyAfterParentPlan, - applyPlan: Query_downvotesafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Query_downvotesorderByautoApplyAfterParentPlan, - applyPlan: Query_downvotesorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Query_downvotesconditionautoApplyAfterParentPlan, - applyPlan: Query_downvotesconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Query_downvotesfilterautoApplyAfterParentPlan, - applyPlan: Query_downvotesfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -13002,36 +12088,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Query_invitationsfirstautoApplyAfterParentPlan, - applyPlan: Query_invitationsfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Query_invitationslastautoApplyAfterParentPlan, - applyPlan: Query_invitationslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Query_invitationsoffsetautoApplyAfterParentPlan, - applyPlan: Query_invitationsoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Query_invitationsbeforeautoApplyAfterParentPlan, - applyPlan: Query_invitationsbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Query_invitationsafterautoApplyAfterParentPlan, - applyPlan: Query_invitationsafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Query_invitationsorderByautoApplyAfterParentPlan, - applyPlan: Query_invitationsorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Query_invitationsconditionautoApplyAfterParentPlan, - applyPlan: Query_invitationsconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Query_invitationsfilterautoApplyAfterParentPlan, - applyPlan: Query_invitationsfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed2(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -13041,36 +12151,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Query_upvotesfirstautoApplyAfterParentPlan, - applyPlan: Query_upvotesfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Query_upvoteslastautoApplyAfterParentPlan, - applyPlan: Query_upvoteslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Query_upvotesoffsetautoApplyAfterParentPlan, - applyPlan: Query_upvotesoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Query_upvotesbeforeautoApplyAfterParentPlan, - applyPlan: Query_upvotesbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Query_upvotesafterautoApplyAfterParentPlan, - applyPlan: Query_upvotesafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Query_upvotesorderByautoApplyAfterParentPlan, - applyPlan: Query_upvotesorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Query_upvotesconditionautoApplyAfterParentPlan, - applyPlan: Query_upvotesconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Query_upvotesfilterautoApplyAfterParentPlan, - applyPlan: Query_upvotesfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed3(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -13080,36 +12214,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Query_commentsfirstautoApplyAfterParentPlan, - applyPlan: Query_commentsfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Query_commentslastautoApplyAfterParentPlan, - applyPlan: Query_commentslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Query_commentsoffsetautoApplyAfterParentPlan, - applyPlan: Query_commentsoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Query_commentsbeforeautoApplyAfterParentPlan, - applyPlan: Query_commentsbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Query_commentsafterautoApplyAfterParentPlan, - applyPlan: Query_commentsafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Query_commentsorderByautoApplyAfterParentPlan, - applyPlan: Query_commentsorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Query_commentsconditionautoApplyAfterParentPlan, - applyPlan: Query_commentsconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Query_commentsfilterautoApplyAfterParentPlan, - applyPlan: Query_commentsfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed4(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -13119,36 +12277,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Query_organizationsfirstautoApplyAfterParentPlan, - applyPlan: Query_organizationsfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Query_organizationslastautoApplyAfterParentPlan, - applyPlan: Query_organizationslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Query_organizationsoffsetautoApplyAfterParentPlan, - applyPlan: Query_organizationsoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Query_organizationsbeforeautoApplyAfterParentPlan, - applyPlan: Query_organizationsbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Query_organizationsafterautoApplyAfterParentPlan, - applyPlan: Query_organizationsafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Query_organizationsorderByautoApplyAfterParentPlan, - applyPlan: Query_organizationsorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Query_organizationsconditionautoApplyAfterParentPlan, - applyPlan: Query_organizationsconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Query_organizationsfilterautoApplyAfterParentPlan, - applyPlan: Query_organizationsfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed5(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -13158,36 +12340,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Query_projectsfirstautoApplyAfterParentPlan, - applyPlan: Query_projectsfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Query_projectslastautoApplyAfterParentPlan, - applyPlan: Query_projectslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Query_projectsoffsetautoApplyAfterParentPlan, - applyPlan: Query_projectsoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Query_projectsbeforeautoApplyAfterParentPlan, - applyPlan: Query_projectsbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Query_projectsafterautoApplyAfterParentPlan, - applyPlan: Query_projectsafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Query_projectsorderByautoApplyAfterParentPlan, - applyPlan: Query_projectsorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Query_projectsconditionautoApplyAfterParentPlan, - applyPlan: Query_projectsconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Query_projectsfilterautoApplyAfterParentPlan, - applyPlan: Query_projectsfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed6(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -13197,36 +12403,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Query_postsfirstautoApplyAfterParentPlan, - applyPlan: Query_postsfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Query_postslastautoApplyAfterParentPlan, - applyPlan: Query_postslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Query_postsoffsetautoApplyAfterParentPlan, - applyPlan: Query_postsoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Query_postsbeforeautoApplyAfterParentPlan, - applyPlan: Query_postsbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Query_postsafterautoApplyAfterParentPlan, - applyPlan: Query_postsafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Query_postsorderByautoApplyAfterParentPlan, - applyPlan: Query_postsorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Query_postsconditionautoApplyAfterParentPlan, - applyPlan: Query_postsconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Query_postsfilterautoApplyAfterParentPlan, - applyPlan: Query_postsfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed7(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -13236,36 +12466,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Query_postStatusesfirstautoApplyAfterParentPlan, - applyPlan: Query_postStatusesfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Query_postStatuseslastautoApplyAfterParentPlan, - applyPlan: Query_postStatuseslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Query_postStatusesoffsetautoApplyAfterParentPlan, - applyPlan: Query_postStatusesoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Query_postStatusesbeforeautoApplyAfterParentPlan, - applyPlan: Query_postStatusesbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Query_postStatusesafterautoApplyAfterParentPlan, - applyPlan: Query_postStatusesafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Query_postStatusesorderByautoApplyAfterParentPlan, - applyPlan: Query_postStatusesorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Query_postStatusesconditionautoApplyAfterParentPlan, - applyPlan: Query_postStatusesconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Query_postStatusesfilterautoApplyAfterParentPlan, - applyPlan: Query_postStatusesfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed8(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -13275,36 +12529,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Query_usersfirstautoApplyAfterParentPlan, - applyPlan: Query_usersfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Query_userslastautoApplyAfterParentPlan, - applyPlan: Query_userslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Query_usersoffsetautoApplyAfterParentPlan, - applyPlan: Query_usersoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Query_usersbeforeautoApplyAfterParentPlan, - applyPlan: Query_usersbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Query_usersafterautoApplyAfterParentPlan, - applyPlan: Query_usersafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Query_usersorderByautoApplyAfterParentPlan, - applyPlan: Query_usersorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Query_usersconditionautoApplyAfterParentPlan, - applyPlan: Query_usersconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Query_usersfilterautoApplyAfterParentPlan, - applyPlan: Query_usersfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed9(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -13314,36 +12592,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Query_membersfirstautoApplyAfterParentPlan, - applyPlan: Query_membersfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Query_memberslastautoApplyAfterParentPlan, - applyPlan: Query_memberslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Query_membersoffsetautoApplyAfterParentPlan, - applyPlan: Query_membersoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Query_membersbeforeautoApplyAfterParentPlan, - applyPlan: Query_membersbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Query_membersafterautoApplyAfterParentPlan, - applyPlan: Query_membersafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Query_membersorderByautoApplyAfterParentPlan, - applyPlan: Query_membersorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Query_membersconditionautoApplyAfterParentPlan, - applyPlan: Query_membersconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Query_membersfilterautoApplyAfterParentPlan, - applyPlan: Query_membersfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed10(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } } @@ -13447,36 +12749,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Post_upvotesfirstautoApplyAfterParentPlan, - applyPlan: Post_upvotesfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Post_upvoteslastautoApplyAfterParentPlan, - applyPlan: Post_upvoteslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Post_upvotesoffsetautoApplyAfterParentPlan, - applyPlan: Post_upvotesoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Post_upvotesbeforeautoApplyAfterParentPlan, - applyPlan: Post_upvotesbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Post_upvotesafterautoApplyAfterParentPlan, - applyPlan: Post_upvotesafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Post_upvotesorderByautoApplyAfterParentPlan, - applyPlan: Post_upvotesorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Post_upvotesconditionautoApplyAfterParentPlan, - applyPlan: Post_upvotesconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Post_upvotesfilterautoApplyAfterParentPlan, - applyPlan: Post_upvotesfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed11(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -13489,36 +12815,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Post_commentsfirstautoApplyAfterParentPlan, - applyPlan: Post_commentsfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Post_commentslastautoApplyAfterParentPlan, - applyPlan: Post_commentslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Post_commentsoffsetautoApplyAfterParentPlan, - applyPlan: Post_commentsoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Post_commentsbeforeautoApplyAfterParentPlan, - applyPlan: Post_commentsbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Post_commentsafterautoApplyAfterParentPlan, - applyPlan: Post_commentsafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Post_commentsorderByautoApplyAfterParentPlan, - applyPlan: Post_commentsorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Post_commentsconditionautoApplyAfterParentPlan, - applyPlan: Post_commentsconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Post_commentsfilterautoApplyAfterParentPlan, - applyPlan: Post_commentsfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed12(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -13531,36 +12881,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Post_downvotesfirstautoApplyAfterParentPlan, - applyPlan: Post_downvotesfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Post_downvoteslastautoApplyAfterParentPlan, - applyPlan: Post_downvoteslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Post_downvotesoffsetautoApplyAfterParentPlan, - applyPlan: Post_downvotesoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Post_downvotesbeforeautoApplyAfterParentPlan, - applyPlan: Post_downvotesbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Post_downvotesafterautoApplyAfterParentPlan, - applyPlan: Post_downvotesafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Post_downvotesorderByautoApplyAfterParentPlan, - applyPlan: Post_downvotesorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Post_downvotesconditionautoApplyAfterParentPlan, - applyPlan: Post_downvotesconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Post_downvotesfilterautoApplyAfterParentPlan, - applyPlan: Post_downvotesfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed13(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } } @@ -13605,36 +12979,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Project_postsfirstautoApplyAfterParentPlan, - applyPlan: Project_postsfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Project_postslastautoApplyAfterParentPlan, - applyPlan: Project_postslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Project_postsoffsetautoApplyAfterParentPlan, - applyPlan: Project_postsoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Project_postsbeforeautoApplyAfterParentPlan, - applyPlan: Project_postsbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Project_postsafterautoApplyAfterParentPlan, - applyPlan: Project_postsafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Project_postsorderByautoApplyAfterParentPlan, - applyPlan: Project_postsorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Project_postsconditionautoApplyAfterParentPlan, - applyPlan: Project_postsconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Project_postsfilterautoApplyAfterParentPlan, - applyPlan: Project_postsfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed14(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -13647,36 +13045,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Project_postStatusesfirstautoApplyAfterParentPlan, - applyPlan: Project_postStatusesfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Project_postStatuseslastautoApplyAfterParentPlan, - applyPlan: Project_postStatuseslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Project_postStatusesoffsetautoApplyAfterParentPlan, - applyPlan: Project_postStatusesoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Project_postStatusesbeforeautoApplyAfterParentPlan, - applyPlan: Project_postStatusesbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Project_postStatusesafterautoApplyAfterParentPlan, - applyPlan: Project_postStatusesafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Project_postStatusesorderByautoApplyAfterParentPlan, - applyPlan: Project_postStatusesorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Project_postStatusesconditionautoApplyAfterParentPlan, - applyPlan: Project_postStatusesconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Project_postStatusesfilterautoApplyAfterParentPlan, - applyPlan: Project_postStatusesfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed15(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } } @@ -13707,36 +13129,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Organization_projectsfirstautoApplyAfterParentPlan, - applyPlan: Organization_projectsfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Organization_projectslastautoApplyAfterParentPlan, - applyPlan: Organization_projectslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Organization_projectsoffsetautoApplyAfterParentPlan, - applyPlan: Organization_projectsoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Organization_projectsbeforeautoApplyAfterParentPlan, - applyPlan: Organization_projectsbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Organization_projectsafterautoApplyAfterParentPlan, - applyPlan: Organization_projectsafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Organization_projectsorderByautoApplyAfterParentPlan, - applyPlan: Organization_projectsorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Organization_projectsconditionautoApplyAfterParentPlan, - applyPlan: Organization_projectsconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Organization_projectsfilterautoApplyAfterParentPlan, - applyPlan: Organization_projectsfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed16(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -13749,36 +13195,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Organization_membersfirstautoApplyAfterParentPlan, - applyPlan: Organization_membersfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Organization_memberslastautoApplyAfterParentPlan, - applyPlan: Organization_memberslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Organization_membersoffsetautoApplyAfterParentPlan, - applyPlan: Organization_membersoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Organization_membersbeforeautoApplyAfterParentPlan, - applyPlan: Organization_membersbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Organization_membersafterautoApplyAfterParentPlan, - applyPlan: Organization_membersafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Organization_membersorderByautoApplyAfterParentPlan, - applyPlan: Organization_membersorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Organization_membersconditionautoApplyAfterParentPlan, - applyPlan: Organization_membersconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Organization_membersfilterautoApplyAfterParentPlan, - applyPlan: Organization_membersfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed17(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -13791,36 +13261,60 @@ export const plans = { }, args: { first: { - autoApplyAfterParentPlan: Organization_invitationsfirstautoApplyAfterParentPlan, - applyPlan: Organization_invitationsfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: Organization_invitationslastautoApplyAfterParentPlan, - applyPlan: Organization_invitationslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: Organization_invitationsoffsetautoApplyAfterParentPlan, - applyPlan: Organization_invitationsoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: Organization_invitationsbeforeautoApplyAfterParentPlan, - applyPlan: Organization_invitationsbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: Organization_invitationsafterautoApplyAfterParentPlan, - applyPlan: Organization_invitationsafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: Organization_invitationsorderByautoApplyAfterParentPlan, - applyPlan: Organization_invitationsorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: Organization_invitationsconditionautoApplyAfterParentPlan, - applyPlan: Organization_invitationsconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: Organization_invitationsfilterautoApplyAfterParentPlan, - applyPlan: Organization_invitationsfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed18(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } } @@ -13848,12 +13342,24 @@ export const plans = { }, args: { groupBy: { - autoApplyAfterParentPlan: ProjectConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, - applyPlan: ProjectConnection_groupedAggregatesgroupByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(ProjectGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; + } }, having: { - autoApplyAfterParentPlan: ProjectConnection_groupedAggregateshavingautoApplyAfterParentPlan, - applyPlan: ProjectConnection_groupedAggregateshavingautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); + } } } } @@ -14238,7 +13744,10 @@ export const plans = { step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -14251,7 +13760,10 @@ export const plans = { step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -14262,9 +13774,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -14272,9 +13787,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, NAME_ASC: { @@ -14282,8 +13800,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "name", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, NAME_DESC: { @@ -14291,8 +13813,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "name", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, IMAGE_ASC: { @@ -14300,8 +13826,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "image", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, IMAGE_DESC: { @@ -14309,8 +13839,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "image", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, DESCRIPTION_ASC: { @@ -14318,8 +13852,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "description", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, DESCRIPTION_DESC: { @@ -14327,8 +13865,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "description", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, ORGANIZATION_ID_ASC: { @@ -14336,8 +13878,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "organization_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, ORGANIZATION_ID_DESC: { @@ -14345,8 +13891,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "organization_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -14354,8 +13904,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -14363,8 +13917,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -14372,8 +13930,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -14381,8 +13943,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, SLUG_ASC: { @@ -14390,8 +13956,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "slug", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, SLUG_DESC: { @@ -14399,8 +13969,12 @@ export const plans = { if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "slug", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, POSTS_COUNT_ASC: { @@ -15580,10 +15154,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = undefined ? undefined(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec ? resolveInputCodec(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue ? resolveSqlValue($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve(sqlIdentifier, sqlValue, $input, $where, { @@ -15610,9 +15184,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve2(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "equalTo" @@ -15637,9 +15211,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve3(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEqualTo" @@ -15664,9 +15238,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve4(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "distinctFrom" @@ -15691,9 +15265,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve5(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notDistinctFrom" @@ -15718,9 +15292,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec3 ? resolveInputCodec3(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve6(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "in" @@ -15745,9 +15319,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec3 ? resolveInputCodec3(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve7(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIn" @@ -15772,9 +15346,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve8(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThan" @@ -15799,9 +15373,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve9(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThanOrEqualTo" @@ -15826,9 +15400,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve10(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThan" @@ -15853,9 +15427,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier ? resolveSqlIdentifier(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec2 ? resolveInputCodec2(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve11(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThanOrEqualTo" @@ -15879,10 +15453,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = undefined ? undefined(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec4 ? resolveInputCodec4(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue2 ? resolveSqlValue2($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve12(sqlIdentifier, sqlValue, $input, $where, { @@ -15909,9 +15483,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve13(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "equalTo" @@ -15936,9 +15510,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve14(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEqualTo" @@ -15963,9 +15537,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve15(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "distinctFrom" @@ -15990,9 +15564,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve16(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notDistinctFrom" @@ -16017,9 +15591,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec6 ? resolveInputCodec6(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve17(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "in" @@ -16044,9 +15618,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec6 ? resolveInputCodec6(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve18(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIn" @@ -16071,9 +15645,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve19(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThan" @@ -16098,9 +15672,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve20(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThanOrEqualTo" @@ -16125,9 +15699,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve21(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThan" @@ -16152,9 +15726,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve22(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThanOrEqualTo" @@ -16181,7 +15755,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput ? lambda($input, resolveInput) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve23(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "includes" @@ -16208,7 +15782,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput2 ? lambda($input, resolveInput2) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve24(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIncludes" @@ -16235,7 +15809,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput3 ? lambda($input, resolveInput3) : $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve25(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "includesInsensitive" @@ -16262,7 +15836,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput4 ? lambda($input, resolveInput4) : $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve26(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIncludesInsensitive" @@ -16289,7 +15863,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput5 ? lambda($input, resolveInput5) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve27(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "startsWith" @@ -16316,7 +15890,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput6 ? lambda($input, resolveInput6) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve28(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notStartsWith" @@ -16343,7 +15917,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput7 ? lambda($input, resolveInput7) : $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve29(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "startsWithInsensitive" @@ -16370,7 +15944,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput8 ? lambda($input, resolveInput8) : $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve30(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notStartsWithInsensitive" @@ -16397,7 +15971,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput9 ? lambda($input, resolveInput9) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve31(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "endsWith" @@ -16424,7 +15998,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput10 ? lambda($input, resolveInput10) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve32(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEndsWith" @@ -16451,7 +16025,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput11 ? lambda($input, resolveInput11) : $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve33(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "endsWithInsensitive" @@ -16478,7 +16052,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); const $resolvedInput = resolveInput12 ? lambda($input, resolveInput12) : $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve34(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEndsWithInsensitive" @@ -16503,9 +16077,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve35(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "like" @@ -16530,9 +16104,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier2 ? resolveSqlIdentifier2(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec5 ? resolveInputCodec5(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve36(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notLike" @@ -16557,9 +16131,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier3 ? resolveSqlIdentifier3(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve37(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "likeInsensitive" @@ -16584,9 +16158,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier3 ? resolveSqlIdentifier3(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec7 ? resolveInputCodec7(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve38(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notLikeInsensitive" @@ -16611,7 +16185,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier4 ? resolveSqlIdentifier4(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec8 ? resolveInputCodec8(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue3 ? resolveSqlValue3($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve13(sqlIdentifier, sqlValue, $input, $where, { @@ -16638,7 +16212,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier5 ? resolveSqlIdentifier5(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec9 ? resolveInputCodec9(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue4 ? resolveSqlValue4($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve14(sqlIdentifier, sqlValue, $input, $where, { @@ -16665,7 +16239,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier6 ? resolveSqlIdentifier6(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec10 ? resolveInputCodec10(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue5 ? resolveSqlValue5($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve15(sqlIdentifier, sqlValue, $input, $where, { @@ -16692,7 +16266,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier7 ? resolveSqlIdentifier7(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec11 ? resolveInputCodec11(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue6 ? resolveSqlValue6($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve16(sqlIdentifier, sqlValue, $input, $where, { @@ -16719,7 +16293,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier8 ? resolveSqlIdentifier8(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec12 ? resolveInputCodec12(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue7 ? resolveSqlValue7($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve17(sqlIdentifier, sqlValue, $input, $where, { @@ -16746,7 +16320,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier9 ? resolveSqlIdentifier9(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec13 ? resolveInputCodec13(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue8 ? resolveSqlValue8($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve18(sqlIdentifier, sqlValue, $input, $where, { @@ -16773,7 +16347,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier10 ? resolveSqlIdentifier10(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec14 ? resolveInputCodec14(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue9 ? resolveSqlValue9($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve19(sqlIdentifier, sqlValue, $input, $where, { @@ -16800,7 +16374,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier11 ? resolveSqlIdentifier11(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec15 ? resolveInputCodec15(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue10 ? resolveSqlValue10($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve20(sqlIdentifier, sqlValue, $input, $where, { @@ -16827,7 +16401,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier12 ? resolveSqlIdentifier12(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec16 ? resolveInputCodec16(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue11 ? resolveSqlValue11($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve21(sqlIdentifier, sqlValue, $input, $where, { @@ -16854,7 +16428,7 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier13 ? resolveSqlIdentifier13(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec17 ? resolveInputCodec17(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue12 ? resolveSqlValue12($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve22(sqlIdentifier, sqlValue, $input, $where, { @@ -16880,10 +16454,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = undefined ? undefined(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec18 ? resolveInputCodec18(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue13 ? resolveSqlValue13($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve39(sqlIdentifier, sqlValue, $input, $where, { @@ -16910,9 +16484,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve40(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "equalTo" @@ -16937,9 +16511,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve41(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEqualTo" @@ -16964,9 +16538,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve42(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "distinctFrom" @@ -16991,9 +16565,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve43(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notDistinctFrom" @@ -17018,9 +16592,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec20 ? resolveInputCodec20(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve44(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "in" @@ -17045,9 +16619,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec20 ? resolveInputCodec20(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve45(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIn" @@ -17072,9 +16646,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve46(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThan" @@ -17099,9 +16673,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve47(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThanOrEqualTo" @@ -17126,9 +16700,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve48(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThan" @@ -17153,9 +16727,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier14 ? resolveSqlIdentifier14(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec19 ? resolveInputCodec19(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve49(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThanOrEqualTo" @@ -18153,10 +17727,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = undefined ? undefined(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec21 ? resolveInputCodec21(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue14 ? resolveSqlValue14($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve50(sqlIdentifier, sqlValue, $input, $where, { @@ -18183,9 +17757,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve51(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "equalTo" @@ -18210,9 +17784,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve52(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEqualTo" @@ -18237,9 +17811,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve53(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "distinctFrom" @@ -18264,9 +17838,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve54(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notDistinctFrom" @@ -18291,9 +17865,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec23 ? resolveInputCodec23(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve55(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "in" @@ -18318,9 +17892,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec23 ? resolveInputCodec23(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve56(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIn" @@ -18345,9 +17919,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve57(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThan" @@ -18372,9 +17946,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve58(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThanOrEqualTo" @@ -18399,9 +17973,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve59(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThan" @@ -18426,9 +18000,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier15 ? resolveSqlIdentifier15(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec22 ? resolveInputCodec22(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve60(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThanOrEqualTo" @@ -18795,10 +18369,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = undefined ? undefined(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec24 ? resolveInputCodec24(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue15 ? resolveSqlValue15($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve61(sqlIdentifier, sqlValue, $input, $where, { @@ -18825,9 +18399,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve62(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "equalTo" @@ -18852,9 +18426,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve63(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEqualTo" @@ -18879,9 +18453,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve64(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "distinctFrom" @@ -18906,9 +18480,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve65(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notDistinctFrom" @@ -18933,9 +18507,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec26 ? resolveInputCodec26(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve66(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "in" @@ -18960,9 +18534,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec26 ? resolveInputCodec26(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve67(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIn" @@ -18987,9 +18561,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve68(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThan" @@ -19014,9 +18588,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve69(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThanOrEqualTo" @@ -19041,9 +18615,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve70(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThan" @@ -19068,9 +18642,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier16 ? resolveSqlIdentifier16(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec25 ? resolveInputCodec25(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve71(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThanOrEqualTo" @@ -20687,10 +20261,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; } = $where.extensions.pgFilterAttribute, sourceAlias = attribute ? attribute.expression ? attribute.expression($where.alias) : sql`${$where.alias}.${sql.identifier(attributeName)}` : expression ? expression : $where.alias, sourceCodec = codec ?? attribute.codec, - [sqlIdentifier, identifierCodec] = [sourceAlias, sourceCodec]; + [sqlIdentifier, identifierCodec] = undefined ? undefined(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec27 ? resolveInputCodec27(codec ?? attribute.codec) : codec ?? attribute.codec, sqlValue = resolveSqlValue16 ? resolveSqlValue16($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve72(sqlIdentifier, sqlValue, $input, $where, { @@ -20717,9 +20291,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve73(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "equalTo" @@ -20744,9 +20318,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve74(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notEqualTo" @@ -20771,9 +20345,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve75(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "distinctFrom" @@ -20798,9 +20372,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve76(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notDistinctFrom" @@ -20825,9 +20399,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec29 ? resolveInputCodec29(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve77(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "in" @@ -20852,9 +20426,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec29 ? resolveInputCodec29(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve78(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "notIn" @@ -20879,9 +20453,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve79(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThan" @@ -20906,9 +20480,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve80(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "lessThanOrEqualTo" @@ -20933,9 +20507,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve81(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThan" @@ -20960,9 +20534,9 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; [sqlIdentifier, identifierCodec] = resolveSqlIdentifier17 ? resolveSqlIdentifier17(sourceAlias, sourceCodec) : [sourceAlias, sourceCodec]; if (false && $input.evalIs(null)) return; if (!false && $input.evalIs(null)) throw Object.assign(new Error("Null literals are forbidden in filter argument input."), {}); - const $resolvedInput = $input, + const $resolvedInput = undefined ? lambda($input, undefined) : $input, inputCodec = resolveInputCodec28 ? resolveInputCodec28(codec ?? attribute.codec) : codec ?? attribute.codec, - sqlValue = $where.placeholder($resolvedInput, inputCodec), + sqlValue = undefined ? undefined($where, $input, inputCodec) : $where.placeholder($resolvedInput, inputCodec), fragment = resolve82(sqlIdentifier, sqlValue, $input, $where, { fieldName: parentFieldName ?? null, operatorName: "greaterThanOrEqualTo" @@ -21261,12 +20835,24 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: MemberConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, - applyPlan: MemberConnection_groupedAggregatesgroupByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(MemberGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; + } }, having: { - autoApplyAfterParentPlan: MemberConnection_groupedAggregateshavingautoApplyAfterParentPlan, - applyPlan: MemberConnection_groupedAggregateshavingautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); + } } } } @@ -21334,36 +20920,60 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { first: { - autoApplyAfterParentPlan: User_postsfirstautoApplyAfterParentPlan, - applyPlan: User_postsfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: User_postslastautoApplyAfterParentPlan, - applyPlan: User_postslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: User_postsoffsetautoApplyAfterParentPlan, - applyPlan: User_postsoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: User_postsbeforeautoApplyAfterParentPlan, - applyPlan: User_postsbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: User_postsafterautoApplyAfterParentPlan, - applyPlan: User_postsafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: User_postsorderByautoApplyAfterParentPlan, - applyPlan: User_postsorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: User_postsconditionautoApplyAfterParentPlan, - applyPlan: User_postsconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: User_postsfilterautoApplyAfterParentPlan, - applyPlan: User_postsfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed56(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -21376,36 +20986,60 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { first: { - autoApplyAfterParentPlan: User_upvotesfirstautoApplyAfterParentPlan, - applyPlan: User_upvotesfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: User_upvoteslastautoApplyAfterParentPlan, - applyPlan: User_upvoteslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: User_upvotesoffsetautoApplyAfterParentPlan, - applyPlan: User_upvotesoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: User_upvotesbeforeautoApplyAfterParentPlan, - applyPlan: User_upvotesbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: User_upvotesafterautoApplyAfterParentPlan, - applyPlan: User_upvotesafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: User_upvotesorderByautoApplyAfterParentPlan, - applyPlan: User_upvotesorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: User_upvotesconditionautoApplyAfterParentPlan, - applyPlan: User_upvotesconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: User_upvotesfilterautoApplyAfterParentPlan, - applyPlan: User_upvotesfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed57(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -21418,36 +21052,60 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { first: { - autoApplyAfterParentPlan: User_membersfirstautoApplyAfterParentPlan, - applyPlan: User_membersfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: User_memberslastautoApplyAfterParentPlan, - applyPlan: User_memberslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: User_membersoffsetautoApplyAfterParentPlan, - applyPlan: User_membersoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: User_membersbeforeautoApplyAfterParentPlan, - applyPlan: User_membersbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: User_membersafterautoApplyAfterParentPlan, - applyPlan: User_membersafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: User_membersorderByautoApplyAfterParentPlan, - applyPlan: User_membersorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: User_membersconditionautoApplyAfterParentPlan, - applyPlan: User_membersconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: User_membersfilterautoApplyAfterParentPlan, - applyPlan: User_membersfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed58(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -21460,36 +21118,60 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { first: { - autoApplyAfterParentPlan: User_commentsfirstautoApplyAfterParentPlan, - applyPlan: User_commentsfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: User_commentslastautoApplyAfterParentPlan, - applyPlan: User_commentslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: User_commentsoffsetautoApplyAfterParentPlan, - applyPlan: User_commentsoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: User_commentsbeforeautoApplyAfterParentPlan, - applyPlan: User_commentsbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: User_commentsafterautoApplyAfterParentPlan, - applyPlan: User_commentsafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: User_commentsorderByautoApplyAfterParentPlan, - applyPlan: User_commentsorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: User_commentsconditionautoApplyAfterParentPlan, - applyPlan: User_commentsconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: User_commentsfilterautoApplyAfterParentPlan, - applyPlan: User_commentsfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed59(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } }, @@ -21502,36 +21184,60 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { first: { - autoApplyAfterParentPlan: User_downvotesfirstautoApplyAfterParentPlan, - applyPlan: User_downvotesfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: User_downvoteslastautoApplyAfterParentPlan, - applyPlan: User_downvoteslastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: User_downvotesoffsetautoApplyAfterParentPlan, - applyPlan: User_downvotesoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: User_downvotesbeforeautoApplyAfterParentPlan, - applyPlan: User_downvotesbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: User_downvotesafterautoApplyAfterParentPlan, - applyPlan: User_downvotesafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: User_downvotesorderByautoApplyAfterParentPlan, - applyPlan: User_downvotesorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: User_downvotesconditionautoApplyAfterParentPlan, - applyPlan: User_downvotesconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: User_downvotesfilterautoApplyAfterParentPlan, - applyPlan: User_downvotesfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed60(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } } @@ -21559,12 +21265,24 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: PostConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, - applyPlan: PostConnection_groupedAggregatesgroupByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(PostGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; + } }, having: { - autoApplyAfterParentPlan: PostConnection_groupedAggregateshavingautoApplyAfterParentPlan, - applyPlan: PostConnection_groupedAggregateshavingautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); + } } } } @@ -21957,7 +21675,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -21970,7 +21691,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -21981,9 +21705,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -21991,9 +21718,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, TITLE_ASC: { @@ -22001,8 +21731,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "title", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, TITLE_DESC: { @@ -22010,8 +21744,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "title", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, DESCRIPTION_ASC: { @@ -22019,8 +21757,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "description", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, DESCRIPTION_DESC: { @@ -22028,8 +21770,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "description", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, PROJECT_ID_ASC: { @@ -22037,8 +21783,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "project_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, PROJECT_ID_DESC: { @@ -22046,8 +21796,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "project_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, USER_ID_ASC: { @@ -22055,8 +21809,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, USER_ID_DESC: { @@ -22064,8 +21822,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -22073,8 +21835,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -22082,8 +21848,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -22091,8 +21861,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -22100,8 +21874,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, STATUS_ID_ASC: { @@ -22109,8 +21887,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "status_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, STATUS_ID_DESC: { @@ -22118,8 +21900,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "status_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, STATUS_UPDATED_AT_ASC: { @@ -22127,8 +21913,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "status_updated_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, STATUS_UPDATED_AT_DESC: { @@ -22136,8 +21926,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "status_updated_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPVOTES_COUNT_ASC: { @@ -23161,12 +22955,24 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: UpvoteConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, - applyPlan: UpvoteConnection_groupedAggregatesgroupByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(UpvoteGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; + } }, having: { - autoApplyAfterParentPlan: UpvoteConnection_groupedAggregateshavingautoApplyAfterParentPlan, - applyPlan: UpvoteConnection_groupedAggregateshavingautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); + } } } } @@ -23486,7 +23292,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -23499,7 +23308,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -23510,9 +23322,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -23520,9 +23335,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, POST_ID_ASC: { @@ -23530,9 +23348,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "post_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, POST_ID_DESC: { @@ -23540,9 +23361,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "post_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, USER_ID_ASC: { @@ -23550,8 +23374,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, USER_ID_DESC: { @@ -23559,8 +23387,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -23568,8 +23400,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -23577,8 +23413,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -23586,8 +23426,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -23595,8 +23439,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } } }, @@ -23708,7 +23556,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -23721,7 +23572,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -23732,9 +23586,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, USER_ID_DESC: { @@ -23742,9 +23599,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, ORGANIZATION_ID_ASC: { @@ -23752,8 +23612,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "organization_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, ORGANIZATION_ID_DESC: { @@ -23761,8 +23625,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "organization_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -23770,8 +23638,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -23779,8 +23651,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, ROLE_ASC: { @@ -23788,8 +23664,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "role", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, ROLE_DESC: { @@ -23797,8 +23677,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "role", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, ROW_ID_ASC: { @@ -23806,9 +23690,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -23816,9 +23703,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } } }, @@ -23942,12 +23832,24 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: CommentConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, - applyPlan: CommentConnection_groupedAggregatesgroupByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(CommentGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; + } }, having: { - autoApplyAfterParentPlan: CommentConnection_groupedAggregateshavingautoApplyAfterParentPlan, - applyPlan: CommentConnection_groupedAggregateshavingautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); + } } } } @@ -24278,7 +24180,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -24291,7 +24196,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -24302,9 +24210,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -24312,9 +24223,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, MESSAGE_ASC: { @@ -24322,8 +24236,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "message", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, MESSAGE_DESC: { @@ -24331,8 +24249,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "message", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, POST_ID_ASC: { @@ -24340,8 +24262,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "post_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, POST_ID_DESC: { @@ -24349,8 +24275,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "post_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, USER_ID_ASC: { @@ -24358,8 +24288,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, USER_ID_DESC: { @@ -24367,8 +24301,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -24376,8 +24314,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -24385,8 +24327,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -24394,8 +24340,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -24403,8 +24353,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } } }, @@ -24547,12 +24501,24 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: DownvoteConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, - applyPlan: DownvoteConnection_groupedAggregatesgroupByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(DownvoteGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; + } }, having: { - autoApplyAfterParentPlan: DownvoteConnection_groupedAggregateshavingautoApplyAfterParentPlan, - applyPlan: DownvoteConnection_groupedAggregateshavingautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); + } } } } @@ -24844,7 +24810,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -24857,7 +24826,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -24868,9 +24840,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -24878,9 +24853,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, POST_ID_ASC: { @@ -24888,9 +24866,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "post_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, POST_ID_DESC: { @@ -24898,9 +24879,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "post_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, USER_ID_ASC: { @@ -24908,8 +24892,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, USER_ID_DESC: { @@ -24917,8 +24905,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "user_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -24926,8 +24918,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -24935,8 +24931,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -24944,8 +24944,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -24953,8 +24957,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } } }, @@ -25285,12 +25293,24 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: InvitationConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, - applyPlan: InvitationConnection_groupedAggregatesgroupByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(InvitationGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; + } }, having: { - autoApplyAfterParentPlan: InvitationConnection_groupedAggregateshavingautoApplyAfterParentPlan, - applyPlan: InvitationConnection_groupedAggregateshavingautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); + } } } } @@ -25602,7 +25622,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -25615,7 +25638,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -25626,9 +25652,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -25636,9 +25665,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, ORGANIZATION_ID_ASC: { @@ -25646,8 +25678,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "organization_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, ORGANIZATION_ID_DESC: { @@ -25655,8 +25691,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "organization_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, EMAIL_ASC: { @@ -25664,9 +25704,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "email", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, EMAIL_DESC: { @@ -25674,9 +25717,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "email", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -25684,8 +25730,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -25693,8 +25743,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -25702,8 +25756,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -25711,8 +25769,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } } }, @@ -25836,12 +25898,24 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: PostStatusConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, - applyPlan: PostStatusConnection_groupedAggregatesgroupByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(PostStatusGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; + } }, having: { - autoApplyAfterParentPlan: PostStatusConnection_groupedAggregateshavingautoApplyAfterParentPlan, - applyPlan: PostStatusConnection_groupedAggregateshavingautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); + } } } } @@ -25886,36 +25960,60 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { first: { - autoApplyAfterParentPlan: PostStatus_postsByStatusIdfirstautoApplyAfterParentPlan, - applyPlan: PostStatus_postsByStatusIdfirstautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, arg) { + $connection.setFirst(arg.getRaw()); + } }, last: { - autoApplyAfterParentPlan: PostStatus_postsByStatusIdlastautoApplyAfterParentPlan, - applyPlan: PostStatus_postsByStatusIdlastautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setLast(val.getRaw()); + } }, offset: { - autoApplyAfterParentPlan: PostStatus_postsByStatusIdoffsetautoApplyAfterParentPlan, - applyPlan: PostStatus_postsByStatusIdoffsetautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setOffset(val.getRaw()); + } }, before: { - autoApplyAfterParentPlan: PostStatus_postsByStatusIdbeforeautoApplyAfterParentPlan, - applyPlan: PostStatus_postsByStatusIdbeforeautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setBefore(val.getRaw()); + } }, after: { - autoApplyAfterParentPlan: PostStatus_postsByStatusIdafterautoApplyAfterParentPlan, - applyPlan: PostStatus_postsByStatusIdafterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val) { + $connection.setAfter(val.getRaw()); + } }, orderBy: { - autoApplyAfterParentPlan: PostStatus_postsByStatusIdorderByautoApplyAfterParentPlan, - applyPlan: PostStatus_postsByStatusIdorderByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, val, info) { + const $value = val.getRaw(), + $select = $connection.getSubplan(); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + return null; + } }, condition: { - autoApplyAfterParentPlan: PostStatus_postsByStatusIdconditionautoApplyAfterParentPlan, - applyPlan: PostStatus_postsByStatusIdconditionautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_condition, $connection) { + return $connection.getSubplan().wherePlan(); + } }, filter: { - autoApplyAfterParentPlan: PostStatus_postsByStatusIdfilterautoApplyAfterParentPlan, - applyPlan: PostStatus_postsByStatusIdfilterautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $connection, fieldArgs) { + assertAllowed61(fieldArgs, "object"); + const $where = $connection.getSubplan().wherePlan(); + if (null) $where.extensions.pgFilterAttribute = { + codec: null + }; + fieldArgs.apply($where); + } } } } @@ -26231,7 +26329,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -26244,7 +26345,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -26255,9 +26359,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -26265,9 +26372,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, STATUS_ASC: { @@ -26275,8 +26385,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "status", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, STATUS_DESC: { @@ -26284,8 +26398,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "status", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, DESCRIPTION_ASC: { @@ -26293,8 +26411,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "description", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, DESCRIPTION_DESC: { @@ -26302,8 +26424,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "description", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, COLOR_ASC: { @@ -26311,8 +26437,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "color", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, COLOR_DESC: { @@ -26320,8 +26450,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "color", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, PROJECT_ID_ASC: { @@ -26329,8 +26463,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "project_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, PROJECT_ID_DESC: { @@ -26338,8 +26476,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "project_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, IS_DEFAULT_ASC: { @@ -26347,8 +26489,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "is_default", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, IS_DEFAULT_DESC: { @@ -26356,8 +26502,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "is_default", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -26365,8 +26515,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -26374,8 +26528,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -26383,8 +26541,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -26392,8 +26554,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, POSTS_BY_STATUS_ID_COUNT_ASC: { @@ -27010,12 +27176,24 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: OrganizationConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, - applyPlan: OrganizationConnection_groupedAggregatesgroupByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(OrganizationGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; + } }, having: { - autoApplyAfterParentPlan: OrganizationConnection_groupedAggregateshavingautoApplyAfterParentPlan, - applyPlan: OrganizationConnection_groupedAggregateshavingautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); + } } } } @@ -27304,7 +27482,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -27317,7 +27498,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -27328,9 +27512,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -27338,9 +27525,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, NAME_ASC: { @@ -27348,9 +27538,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "name", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, NAME_DESC: { @@ -27358,9 +27551,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "name", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -27368,8 +27564,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -27377,8 +27577,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -27386,8 +27590,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -27395,8 +27603,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, SLUG_ASC: { @@ -27404,8 +27616,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "slug", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, SLUG_DESC: { @@ -27413,8 +27629,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "slug", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, PROJECTS_COUNT_ASC: { @@ -28450,12 +28670,24 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { groupBy: { - autoApplyAfterParentPlan: UserConnection_groupedAggregatesgroupByautoApplyAfterParentPlan, - applyPlan: UserConnection_groupedAggregatesgroupByautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect, input) { + var _a, _b; + const val = input.getRaw().eval(); + if (!Array.isArray(val)) throw new Error("Invalid!"); + for (const group of val) { + const config = getEnumValueConfig(UserGroupBy, group), + plan = (_b = (_a = config === null || config === void 0 ? void 0 : config.extensions) === null || _a === void 0 ? void 0 : _a.grafast) === null || _b === void 0 ? void 0 : _b.applyPlan; + if (typeof plan === "function") plan($pgSelect); + } + return null; + } }, having: { - autoApplyAfterParentPlan: UserConnection_groupedAggregateshavingautoApplyAfterParentPlan, - applyPlan: UserConnection_groupedAggregateshavingautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_$parent, $pgSelect) { + return $pgSelect.havingPlan(); + } } } } @@ -28762,7 +28994,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -28775,7 +29010,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; step.orderBy({ codec: attribute.codec, fragment: sql`${step}.${sql.identifier(attributeName)}`, - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); }); step.setOrderIsUnique(); @@ -28786,9 +29024,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, ROW_ID_DESC: { @@ -28796,9 +29037,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, CREATED_AT_ASC: { @@ -28806,8 +29050,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, CREATED_AT_DESC: { @@ -28815,8 +29063,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "created_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_ASC: { @@ -28824,8 +29076,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, UPDATED_AT_DESC: { @@ -28833,8 +29089,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "updated_at", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, HIDRA_ID_ASC: { @@ -28842,9 +29102,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "hidra_id", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, HIDRA_ID_DESC: { @@ -28852,9 +29115,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "hidra_id", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, USERNAME_ASC: { @@ -28862,9 +29128,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "username", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, USERNAME_DESC: { @@ -28872,9 +29141,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "username", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, FIRST_NAME_ASC: { @@ -28882,8 +29154,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "first_name", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, FIRST_NAME_DESC: { @@ -28891,8 +29167,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "first_name", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, LAST_NAME_ASC: { @@ -28900,8 +29180,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "last_name", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, LAST_NAME_DESC: { @@ -28909,8 +29193,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "last_name", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); + if (false) plan.setOrderIsUnique(); } }, EMAIL_ASC: { @@ -28918,9 +29206,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "email", - direction: "ASC" + direction: "ASC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, EMAIL_DESC: { @@ -28928,9 +29219,12 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; if (!(plan instanceof PgSelectStep) && !(plan instanceof PgUnionAllStep)) throw new Error("Expected a PgSelectStep or PgUnionAllStep when applying ordering value"); plan.orderBy({ attribute: "email", - direction: "DESC" + direction: "DESC", + ...(undefined != null ? { + nulls: undefined ? "LAST" : "FIRST" + } : null) }); - plan.setOrderIsUnique(); + if (true) plan.setOrderIsUnique(); } }, POSTS_COUNT_ASC: { @@ -30620,8 +30914,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { input: { - autoApplyAfterParentPlan: Mutation_createDownvoteinputautoApplyAfterParentPlan, - applyPlan: Mutation_createDownvoteinputautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $object) { + return $object; + } } } }, @@ -30635,8 +30931,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { input: { - autoApplyAfterParentPlan: Mutation_createInvitationinputautoApplyAfterParentPlan, - applyPlan: Mutation_createInvitationinputautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $object) { + return $object; + } } } }, @@ -30650,8 +30948,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { input: { - autoApplyAfterParentPlan: Mutation_createUpvoteinputautoApplyAfterParentPlan, - applyPlan: Mutation_createUpvoteinputautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $object) { + return $object; + } } } }, @@ -30665,8 +30965,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { input: { - autoApplyAfterParentPlan: Mutation_createCommentinputautoApplyAfterParentPlan, - applyPlan: Mutation_createCommentinputautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $object) { + return $object; + } } } }, @@ -30680,8 +30982,10 @@ where ${sql.join(conditions.map(c => sql.parens(c)), " AND ")}`})`; }, args: { input: { - autoApplyAfterParentPlan: Mutation_createOrganizationinputautoApplyAfterParentPlan, - applyPlan: Mutation_createOrganizationinputautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $object) { + return $object; + } } } }, @@ -30704,8 +31008,10 @@ ${String(oldPlan)}`); }, args: { input: { - autoApplyAfterParentPlan: Mutation_createProjectinputautoApplyAfterParentPlan, - applyPlan: Mutation_createProjectinputautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $object) { + return $object; + } } } }, @@ -30719,8 +31025,10 @@ ${String(oldPlan)}`); }, args: { input: { - autoApplyAfterParentPlan: Mutation_createPostinputautoApplyAfterParentPlan, - applyPlan: Mutation_createPostinputautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $object) { + return $object; + } } } }, @@ -30743,8 +31051,10 @@ ${String(oldPlan2)}`); }, args: { input: { - autoApplyAfterParentPlan: Mutation_createPostStatusinputautoApplyAfterParentPlan, - applyPlan: Mutation_createPostStatusinputautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $object) { + return $object; + } } } }, @@ -30758,8 +31068,10 @@ ${String(oldPlan2)}`); }, args: { input: { - autoApplyAfterParentPlan: Mutation_createUserinputautoApplyAfterParentPlan, - applyPlan: Mutation_createUserinputautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $object) { + return $object; + } } } }, @@ -30782,8 +31094,10 @@ ${String(oldPlan3)}`); }, args: { input: { - autoApplyAfterParentPlan: Mutation_createMemberinputautoApplyAfterParentPlan, - applyPlan: Mutation_createMemberinputautoApplyAfterParentPlan + autoApplyAfterParentPlan: true, + applyPlan(_, $object) { + return $object; + } } } }, @@ -30805,8 +31119,10 @@ ${String(oldPlan4)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -30821,8 +31137,10 @@ ${String(oldPlan4)}`); return plan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -30844,8 +31162,10 @@ ${String(oldPlan5)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -30867,8 +31187,10 @@ ${String(oldPlan6)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -30890,8 +31212,10 @@ ${String(oldPlan7)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -30913,8 +31237,10 @@ ${String(oldPlan8)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -30936,8 +31262,10 @@ ${String(oldPlan9)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -30959,8 +31287,10 @@ ${String(oldPlan10)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -30982,8 +31312,10 @@ ${String(oldPlan11)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -31005,8 +31337,10 @@ ${String(oldPlan12)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -31028,8 +31362,10 @@ ${String(oldPlan13)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -31044,8 +31380,10 @@ ${String(oldPlan13)}`); return plan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -31067,8 +31405,10 @@ ${String(oldPlan14)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -31090,8 +31430,10 @@ ${String(oldPlan15)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -31113,8 +31455,10 @@ ${String(oldPlan16)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -31136,8 +31480,10 @@ ${String(oldPlan17)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -31159,8 +31505,10 @@ ${String(oldPlan18)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -31182,8 +31530,10 @@ ${String(oldPlan19)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -31205,8 +31555,10 @@ ${String(oldPlan20)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } }, @@ -31228,8 +31580,10 @@ ${String(oldPlan21)}`); return $newPlan; }, args: { - input(_, $object) { - return $object; + input: { + applyPlan(_, $object) { + return $object; + } } } } @@ -31245,23 +31599,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - downvoteEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = downvoteUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_downvotePgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + downvoteEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = downvoteUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_downvotePgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, CreateDownvoteInput: { @@ -31279,6 +31638,9 @@ ${String(oldPlan21)}`); } }, DownvoteInput: { + "__inputPlan": function DownvoteInput_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -31326,23 +31688,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - invitationEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = invitationUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_invitationPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + invitationEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = invitationUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_invitationPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, CreateInvitationInput: { @@ -31360,6 +31727,9 @@ ${String(oldPlan21)}`); } }, InvitationInput: { + "__inputPlan": function InvitationInput_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -31407,23 +31777,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - upvoteEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = upvoteUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_upvotePgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + upvoteEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = upvoteUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_upvotePgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, CreateUpvoteInput: { @@ -31441,6 +31816,9 @@ ${String(oldPlan21)}`); } }, UpvoteInput: { + "__inputPlan": function UpvoteInput_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -31488,23 +31866,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - commentEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = commentUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_commentPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + commentEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = commentUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_commentPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, CreateCommentInput: { @@ -31522,6 +31905,9 @@ ${String(oldPlan21)}`); } }, CommentInput: { + "__inputPlan": function CommentInput_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -31576,23 +31962,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - organizationEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = organizationUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_organizationPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + organizationEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = organizationUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_organizationPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, CreateOrganizationInput: { @@ -31610,6 +32001,9 @@ ${String(oldPlan21)}`); } }, OrganizationInput: { + "__inputPlan": function OrganizationInput_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -31657,23 +32051,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - projectEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = projectUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_projectPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + projectEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = projectUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_projectPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, CreateProjectInput: { @@ -31691,6 +32090,9 @@ ${String(oldPlan21)}`); } }, ProjectInput: { + "__inputPlan": function ProjectInput_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -31759,23 +32161,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - postEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = postUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_postPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + postEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = postUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_postPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, CreatePostInput: { @@ -31793,6 +32200,9 @@ ${String(oldPlan21)}`); } }, PostInput: { + "__inputPlan": function PostInput_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -31868,23 +32278,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - postStatusEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_post_statusPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + postStatusEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_post_statusPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, CreatePostStatusInput: { @@ -31902,6 +32317,9 @@ ${String(oldPlan21)}`); } }, PostStatusInput: { + "__inputPlan": function PostStatusInput_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -31970,23 +32388,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - userEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = userUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_userPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + userEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = userUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_userPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, CreateUserInput: { @@ -32004,6 +32427,9 @@ ${String(oldPlan21)}`); } }, UserInput: { + "__inputPlan": function UserInput_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32072,23 +32498,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - memberEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_memberPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + memberEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_memberPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, CreateMemberInput: { @@ -32106,6 +32537,9 @@ ${String(oldPlan21)}`); } }, MemberInput: { + "__inputPlan": function MemberInput_inputPlan() { + return object(Object.create(null)); + }, userId: { applyPlan($insert, val) { $insert.set("user_id", val.get()); @@ -32153,23 +32587,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - downvoteEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = downvoteUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_downvotePgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + downvoteEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = downvoteUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_downvotePgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, UpdateDownvoteInput: { @@ -32178,6 +32617,7 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, + rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32185,6 +32625,9 @@ ${String(oldPlan21)}`); } }, DownvotePatch: { + "__inputPlan": function DownvotePatch_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32232,23 +32675,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - invitationEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = invitationUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_invitationPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + invitationEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = invitationUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_invitationPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, UpdateInvitationInput: { @@ -32257,6 +32705,7 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, + rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32264,6 +32713,9 @@ ${String(oldPlan21)}`); } }, InvitationPatch: { + "__inputPlan": function InvitationPatch_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32311,23 +32763,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - upvoteEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = upvoteUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_upvotePgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + upvoteEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = upvoteUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_upvotePgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, UpdateUpvoteInput: { @@ -32336,6 +32793,7 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, + rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32343,6 +32801,9 @@ ${String(oldPlan21)}`); } }, UpvotePatch: { + "__inputPlan": function UpvotePatch_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32390,23 +32851,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - commentEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = commentUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_commentPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + commentEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = commentUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_commentPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, UpdateCommentInput: { @@ -32415,6 +32881,7 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, + rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32422,6 +32889,9 @@ ${String(oldPlan21)}`); } }, CommentPatch: { + "__inputPlan": function CommentPatch_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32476,23 +32946,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - organizationEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = organizationUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_organizationPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + organizationEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = organizationUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_organizationPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, UpdateOrganizationInput: { @@ -32501,6 +32976,7 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, + rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32508,6 +32984,9 @@ ${String(oldPlan21)}`); } }, OrganizationPatch: { + "__inputPlan": function OrganizationPatch_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32555,23 +33034,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - projectEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = projectUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_projectPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + projectEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = projectUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_projectPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, UpdateProjectInput: { @@ -32580,6 +33064,7 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, + rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32587,6 +33072,9 @@ ${String(oldPlan21)}`); } }, ProjectPatch: { + "__inputPlan": function ProjectPatch_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32655,23 +33143,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - postEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = postUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_postPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + postEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = postUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_postPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, UpdatePostInput: { @@ -32680,6 +33173,7 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, + rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32687,6 +33181,9 @@ ${String(oldPlan21)}`); } }, PostPatch: { + "__inputPlan": function PostPatch_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32762,23 +33259,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - postStatusEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_post_statusPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + postStatusEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_post_statusPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, UpdatePostStatusInput: { @@ -32787,6 +33289,7 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, + rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32794,6 +33297,9 @@ ${String(oldPlan21)}`); } }, PostStatusPatch: { + "__inputPlan": function PostStatusPatch_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32862,23 +33368,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - userEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = userUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_userPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + userEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = userUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_userPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, UpdateUserInput: { @@ -32887,6 +33398,7 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, + rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32894,6 +33406,9 @@ ${String(oldPlan21)}`); } }, UserPatch: { + "__inputPlan": function UserPatch_inputPlan() { + return object(Object.create(null)); + }, rowId: { applyPlan($insert, val) { $insert.set("id", val.get()); @@ -32962,23 +33477,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - memberEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_memberPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + memberEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_memberPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, UpdateMemberInput: { @@ -32987,6 +33507,7 @@ ${String(oldPlan21)}`); $input.set("clientMutationId", val.get()); } }, + rowId: undefined, patch: { applyPlan($object) { return $object.getStepForKey("result").setPlan(); @@ -32994,6 +33515,9 @@ ${String(oldPlan21)}`); } }, MemberPatch: { + "__inputPlan": function MemberPatch_inputPlan() { + return object(Object.create(null)); + }, userId: { applyPlan($insert, val) { $insert.set("user_id", val.get()); @@ -33041,23 +33565,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - downvoteEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = downvoteUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_downvotePgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + downvoteEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = downvoteUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_downvotePgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("DownvoteOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, DeleteDownvoteInput: { @@ -33065,7 +33594,8 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - } + }, + rowId: undefined }, DeleteInvitationPayload: { __assertStep: ObjectStep, @@ -33078,23 +33608,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - invitationEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = invitationUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_invitationPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + invitationEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = invitationUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_invitationPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("InvitationOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, DeleteInvitationInput: { @@ -33102,7 +33637,8 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - } + }, + rowId: undefined }, DeleteUpvotePayload: { __assertStep: ObjectStep, @@ -33115,23 +33651,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - upvoteEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = upvoteUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_upvotePgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + upvoteEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = upvoteUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_upvotePgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("UpvoteOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, DeleteUpvoteInput: { @@ -33139,7 +33680,8 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - } + }, + rowId: undefined }, DeleteCommentPayload: { __assertStep: ObjectStep, @@ -33152,23 +33694,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - commentEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = commentUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_commentPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + commentEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = commentUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_commentPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("CommentOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, DeleteCommentInput: { @@ -33176,7 +33723,8 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - } + }, + rowId: undefined }, DeleteOrganizationPayload: { __assertStep: ObjectStep, @@ -33189,23 +33737,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - organizationEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = organizationUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_organizationPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + organizationEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = organizationUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_organizationPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("OrganizationOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, DeleteOrganizationInput: { @@ -33213,7 +33766,8 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - } + }, + rowId: undefined }, DeleteProjectPayload: { __assertStep: ObjectStep, @@ -33226,23 +33780,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - projectEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = projectUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_projectPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + projectEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = projectUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_projectPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("ProjectOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, DeleteProjectInput: { @@ -33250,7 +33809,8 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - } + }, + rowId: undefined }, DeletePostPayload: { __assertStep: ObjectStep, @@ -33263,23 +33823,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - postEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = postUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_postPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + postEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = postUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_postPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("PostOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, DeletePostInput: { @@ -33287,7 +33852,8 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - } + }, + rowId: undefined }, DeletePostStatusPayload: { __assertStep: ObjectStep, @@ -33300,23 +33866,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - postStatusEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_post_statusPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + postStatusEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = post_statusUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_post_statusPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("PostStatusOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, DeletePostStatusInput: { @@ -33324,7 +33895,8 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - } + }, + rowId: undefined }, DeleteUserPayload: { __assertStep: ObjectStep, @@ -33337,23 +33909,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - userEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = userUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_userPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + userEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = userUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_userPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("UserOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, DeleteUserInput: { @@ -33361,7 +33938,8 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - } + }, + rowId: undefined }, DeleteMemberPayload: { __assertStep: ObjectStep, @@ -33374,23 +33952,28 @@ ${String(oldPlan21)}`); query() { return rootValue(); }, - memberEdge($mutation, args, info) { - const $result = $mutation.getStepForKey("result", !0); - if (!$result) return constant(null); - const $select = (() => { - if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { - const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { - memo[attributeName] = $result.get(attributeName); - return memo; - }, Object.create(null)); - return resource_memberPgResource.find(spec); - } - })(), - $value = args.getRaw("orderBy"); - applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); - const $connection = connection($select), - $single = $select.row(first($select)); - return new EdgeStep($connection, $single); + memberEdge: { + plan($mutation, args, info) { + const $result = $mutation.getStepForKey("result", !0); + if (!$result) return constant(null); + const $select = (() => { + if ($result instanceof PgDeleteSingleStep) return pgSelectFromRecord($result.resource, $result.record());else { + const spec = memberUniques[0].attributes.reduce((memo, attributeName) => { + memo[attributeName] = $result.get(attributeName); + return memo; + }, Object.create(null)); + return resource_memberPgResource.find(spec); + } + })(), + $value = args.getRaw("orderBy"); + applyOrderToPlan($select, $value, info.schema.getType("MemberOrderBy")); + const $connection = connection($select), + $single = $select.row(first($select)); + return new EdgeStep($connection, $single); + }, + args: { + orderBy: undefined + } } }, DeleteMemberInput: { @@ -33398,7 +33981,8 @@ ${String(oldPlan21)}`); applyPlan($input, val) { $input.set("clientMutationId", val.get()); } - } + }, + rowId: undefined } }; export const schema = makeGrafastSchema({ From 237f039537e83b3930ed931c8175ce4bac76f14b Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Fri, 18 Apr 2025 12:42:11 -0500 Subject: [PATCH 28/29] build(scripts): remove DB generation from start script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 08ca35c..1941cc0 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "GRAPHILE_ENV=development NODE_ENV=development bun run --hot src/server.ts", "build": "bun build --target node --outdir build src/server.ts", - "start": "GRAPHILE_ENV=production NODE_ENV=production bun db:generate && GRAPHILE_ENV=production NODE_ENV=production bun db:migrate && GRAPHILE_ENV=production NODE_ENV=production bun run build/server.js", + "start": "GRAPHILE_ENV=production NODE_ENV=production bun db:migrate && GRAPHILE_ENV=production NODE_ENV=production bun run build/server.js", "lint": "biome lint src", "format": "biome format --write src", "db:check": "bun --env-file .env.local drizzle-kit check", From addc1dd60d1311b0a7a45aac9fc9092532139dc6 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Fri, 18 Apr 2025 12:46:39 -0500 Subject: [PATCH 29/29] chore: remove Docker --- .dockerignore | 5 ----- Dockerfile | 25 ------------------------- 2 files changed, 30 deletions(-) delete mode 100644 .dockerignore delete mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 09fe9b2..0000000 --- a/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -Dockerfile -.dockerignore -node_modules -README.md -.git diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 3af9ad3..0000000 --- a/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -ARG BUN_VERSION=1.2.5 -FROM oven/bun:${BUN_VERSION}-slim as base - -WORKDIR /app - -ENV NODE_ENV="production" - -FROM base as build - -RUN apt-get update -qq && \ - apt-get install --no-install-recommends -y build-essential pkg-config python-is-python3 - -COPY --link bun.lock package.json ./ -RUN bun install --ci - -COPY --link . . - -RUN bun run build - -FROM base - -COPY --from=build /app /app - -EXPOSE 3000 -CMD [ "bun", "run", "start" ]