From 015003856da2c239333b7a92f6d7a6d56b102637 Mon Sep 17 00:00:00 2001 From: hobbescodes Date: Tue, 16 Jun 2026 11:29:19 -0400 Subject: [PATCH 1/5] chore(authz): adopt typed Warden relation contract from providers Make the lib/authz checkPermission wrapper generic over the resource type so permission is constrained to the relations Warden defines for it, matching the new @omnidotdev/providers signature. All existing call sites already use valid relations, so this adds type safety with no behavior change. Bumps providers to the build that ships the contract. --- bun.lock | 4 ++-- package.json | 2 +- src/lib/authz/index.ts | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bun.lock b/bun.lock index e0a0851..16c8717 100644 --- a/bun.lock +++ b/bun.lock @@ -17,7 +17,7 @@ "@graphile/pg-aggregates": "^0.2.0-rc.1", "@graphile/simplify-inflection": "^8.0.0-rc.2", "@graphql-yoga/plugin-disable-introspection": "^2.19.0", - "@omnidotdev/providers": "github:omnidotdev/providers#ddc7829", + "@omnidotdev/providers": "github:omnidotdev/providers#1d1c21d", "@omnidotdev/search": "github:omnidotdev/search", "@opentelemetry/api": "^1.9.0", "@opentelemetry/auto-instrumentations-node": "^0.68.0", @@ -347,7 +347,7 @@ "@npmcli/redact": ["@npmcli/redact@4.0.0", "", {}, "sha512-gOBg5YHMfZy+TfHArfVogwgfBeQnKbbGo3pSUyK/gSI0AVu+pEiDVcKlQb0D8Mg1LNRZILZ6XG8I5dJ4KuAd9Q=="], - "@omnidotdev/providers": ["@omnidotdev/providers@github:omnidotdev/providers#ddc7829", { "dependencies": { "ajv": "^8.18.0", "jose": "^6.1.3" }, "peerDependencies": { "@aws-sdk/client-s3": ">=3.0.0", "@aws-sdk/s3-request-presigner": ">=3.0.0", "@envelop/types": ">=5.0.0", "@escape.tech/graphql-armor": ">=3.0.0", "@iggy.rs/sdk": ">=1.0.0", "@tanstack/query-core": ">=5.0.0", "ajv": ">=8.0.0", "graphile-export": ">=1.0.0-rc.0", "postgraphile": ">=5.0.0-rc.0", "react": ">=19.0.0", "resend": ">=4.0.0", "unleash-client": ">=6.0.0" }, "optionalPeers": ["@aws-sdk/client-s3", "@aws-sdk/s3-request-presigner", "@envelop/types", "@escape.tech/graphql-armor", "@iggy.rs/sdk", "@tanstack/query-core", "ajv", "graphile-export", "postgraphile", "react", "resend", "unleash-client"] }, "omnidotdev-providers-ddc7829", "sha512-WfAqi9pT7vnpUSl+almoxe8jQDjOSTsfbFx4UYXDplfdfnFfBcWzQ6/446byMUSMFIgCbm7LhVv5h/ktayulIg=="], + "@omnidotdev/providers": ["@omnidotdev/providers@github:omnidotdev/providers#1d1c21d", { "dependencies": { "ajv": "^8.18.0", "jose": "^6.1.3" }, "peerDependencies": { "@aws-sdk/client-s3": ">=3.0.0", "@aws-sdk/s3-request-presigner": ">=3.0.0", "@envelop/types": ">=5.0.0", "@escape.tech/graphql-armor": ">=3.0.0", "@iggy.rs/sdk": ">=1.0.0", "@tanstack/query-core": ">=5.0.0", "ajv": ">=8.0.0", "graphile-export": ">=1.0.0-rc.0", "postgraphile": ">=5.0.0-rc.0", "react": ">=19.0.0", "unleash-client": ">=6.0.0" }, "optionalPeers": ["@aws-sdk/client-s3", "@aws-sdk/s3-request-presigner", "@envelop/types", "@escape.tech/graphql-armor", "@iggy.rs/sdk", "@tanstack/query-core", "ajv", "graphile-export", "postgraphile", "react", "unleash-client"] }, "omnidotdev-providers-1d1c21d", "sha512-pOAphUoMvMblUH/STnqm3QYjgs/6j4GSaC36iTpLDt9oLFKoh1vAKkHuB5eYBgdADab7zy3n2qWKTRJ7An1WpA=="], "@omnidotdev/search": ["@omnidotdev/search@github:omnidotdev/search#02bb5c1", { "dependencies": { "meilisearch": "^0.48.0" } }, "omnidotdev-search-02bb5c1", "sha512-1jp7JTCsDy8Ac0qG2kLVK6J/2HDraJhsNVObkBsS/Lobt222cU15uao93PSNpgzOZ014kmI5Gfu/GpcQq8vjuw=="], diff --git a/package.json b/package.json index da20942..ba25be5 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@graphile/pg-aggregates": "^0.2.0-rc.1", "@graphile/simplify-inflection": "^8.0.0-rc.2", "@graphql-yoga/plugin-disable-introspection": "^2.19.0", - "@omnidotdev/providers": "github:omnidotdev/providers#ddc7829", + "@omnidotdev/providers": "github:omnidotdev/providers#1d1c21d", "@omnidotdev/search": "github:omnidotdev/search", "@opentelemetry/api": "^1.9.0", "@opentelemetry/auto-instrumentations-node": "^0.68.0", diff --git a/src/lib/authz/index.ts b/src/lib/authz/index.ts index a656cc6..858bc59 100644 --- a/src/lib/authz/index.ts +++ b/src/lib/authz/index.ts @@ -13,6 +13,8 @@ import { enqueueWardenSync } from "./syncQueue"; import type { PermissionCheck, PermissionCheckResult, + WardenRelation, + WardenResourceType, } from "@omnidotdev/providers"; export { default as authzRoutes } from "./routes"; @@ -35,11 +37,11 @@ export function isAuthzEnabled(): boolean { * Check if a user has permission on a resource. * Exported for graphile-export EXPORTABLE compatibility. */ -export async function checkPermission( +export async function checkPermission( userId: string, - resourceType: string, + resourceType: T, resourceId: string, - permission: string, + permission: WardenRelation, requestCache?: Map, ): Promise { if (!isAuthzEnabled()) return true; From 39f219ac5511e6d2f3177307f95243690fddddbc Mon Sep 17 00:00:00 2001 From: hobbescodes Date: Tue, 16 Jun 2026 13:13:17 -0400 Subject: [PATCH 2/5] fix(db): enable the pgvector extension in the embedding migration Migration 0015 creates vector columns (signal_cluster.centroid, the post and signal embeddings) but no migration enabled the pgvector extension, so a fresh bun db:migrate failed with "type vector does not exist". Prepend CREATE EXTENSION IF NOT EXISTS vector to 0015 so a fresh migrate works without a separate db:setup step. Mirrors the same change already on feature/agentic-workflows. --- src/generated/drizzle/0015_silky_sway.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/src/generated/drizzle/0015_silky_sway.sql b/src/generated/drizzle/0015_silky_sway.sql index 1f332e5..ad49fb7 100644 --- a/src/generated/drizzle/0015_silky_sway.sql +++ b/src/generated/drizzle/0015_silky_sway.sql @@ -1,3 +1,4 @@ +CREATE EXTENSION IF NOT EXISTS vector;--> statement-breakpoint CREATE TABLE "signal_cluster" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "project_id" uuid NOT NULL, From dbecefc8c18fb8a477a4e557fabc0d2d8421f6f0 Mon Sep 17 00:00:00 2001 From: hobbescodes Date: Tue, 16 Jun 2026 13:16:11 -0400 Subject: [PATCH 3/5] chore(knip): fix issues --- src/lib/feedback/dedupe.ts | 2 +- .../graphql/plugins/defaults/DefaultStatusTemplates.plugin.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/feedback/dedupe.ts b/src/lib/feedback/dedupe.ts index 28d425a..f49a180 100644 --- a/src/lib/feedback/dedupe.ts +++ b/src/lib/feedback/dedupe.ts @@ -105,7 +105,7 @@ export const findDuplicate = async ( return toMatch(result.rows, "lexical"); }; -export interface SimilarPost { +interface SimilarPost { id: string; number: number | null; title: string | null; diff --git a/src/lib/graphql/plugins/defaults/DefaultStatusTemplates.plugin.ts b/src/lib/graphql/plugins/defaults/DefaultStatusTemplates.plugin.ts index 0b6fcb1..14ffa79 100644 --- a/src/lib/graphql/plugins/defaults/DefaultStatusTemplates.plugin.ts +++ b/src/lib/graphql/plugins/defaults/DefaultStatusTemplates.plugin.ts @@ -18,8 +18,6 @@ import type { PlanWrapperFn } from "postgraphile/utils"; /** * Default status templates seeded for every organization. - * - * @knipignore also consumed by the backfill script in the knip-ignored scripts dir */ export const DEFAULT_STATUS_TEMPLATES: Omit< InsertStatusTemplate, From 9230568f6b59febea1eaf6adb08d27249e379552 Mon Sep 17 00:00:00 2001 From: hobbescodes Date: Tue, 16 Jun 2026 15:42:19 -0400 Subject: [PATCH 4/5] fix(graphql): register pgvector codec for schema generation `bun db:migrate` runs `graphql:generate`, which failed because PostGraphile has no codec for the pgvector `vector` type used by the embedding columns (post.embedding, signal.embedding, signal_cluster.centroid). Introspection dumped the raw pg_type and warned "Could not build PgCodec for 'public.vector'". Add a gather plugin (modeled on graphile-build-pg's PgLtreePlugin) that registers a codec for `vector`/`_vector`, scoped to the pgvector extension. A behavior override hides the columns from the schema (fields, conditions, filters, ordering, and the pg-aggregates groupBy/aggregate machinery) so internal embeddings stay out of the API, and the codec is mapped to String to silence the per-codec type-preparation warning. --- src/lib/config/graphile.config.ts | 3 + .../graphql/plugins/codecs/PgVector.plugin.ts | 165 ++++++++++++++++++ src/lib/graphql/plugins/codecs/index.ts | 1 + 3 files changed, 169 insertions(+) create mode 100644 src/lib/graphql/plugins/codecs/PgVector.plugin.ts create mode 100644 src/lib/graphql/plugins/codecs/index.ts diff --git a/src/lib/config/graphile.config.ts b/src/lib/config/graphile.config.ts index 3df7d02..e0e84fc 100644 --- a/src/lib/config/graphile.config.ts +++ b/src/lib/config/graphile.config.ts @@ -16,6 +16,7 @@ import { VotePlugin, } from "lib/graphql/plugins/authorization"; import { AuthzSyncPlugin } from "lib/graphql/plugins/authz"; +import { PgVectorPlugin } from "lib/graphql/plugins/codecs"; import { DefaultStatusTemplatesPlugin } from "lib/graphql/plugins/defaults"; import { EventEmissionPlugin, @@ -54,6 +55,8 @@ const preset: GraphileConfig.Preset = { }, disablePlugins: ["PgIndexBehaviorsPlugin"], plugins: [ + // pgvector codec support (must load before introspection builds codecs) + PgVectorPlugin, // Observer query plugin (returns current authenticated user) observerPlugin, // Authorization plugins (pre-mutation validation) diff --git a/src/lib/graphql/plugins/codecs/PgVector.plugin.ts b/src/lib/graphql/plugins/codecs/PgVector.plugin.ts new file mode 100644 index 0000000..a00f216 --- /dev/null +++ b/src/lib/graphql/plugins/codecs/PgVector.plugin.ts @@ -0,0 +1,165 @@ +/** + * pgvector codec plugin. + * + * The feedback brain stores embeddings in `vector` columns (post.embedding, + * signal.embedding, signal_cluster.centroid) provided by the pgvector + * extension. PostGraphile has no built-in codec for `vector`, so introspection + * would otherwise dump the raw pg_type and warn "Could not build PgCodec for + * 'public.vector'; maybe you need a plugin implementing + * gather.hooks.pgCodecs_findPgCodec to add support." before silently dropping + * the columns. + * + * This plugin registers a codec for `vector` (and its array form `_vector`) so + * the type resolves cleanly. The codec is treated as text on the wire: pgvector + * accepts/returns `[1,2,3]` string literals, which is all the runtime needs for + * the columns to round-trip through the registry. + * + * We deliberately do NOT expose embeddings through GraphQL. They are internal AI + * artifacts (1536-float arrays) with no API consumer, are large enough to bloat + * list responses, and grouping/filtering on them is meaningless. The + * `schema.entityBehavior` below disables every attribute behavior for + * vector-typed columns, so they are intentionally excluded from fields, + * conditions, filters, ordering, and the aggregate/groupBy machinery rather than + * triggering "Couldn't find a 'output' variant" warnings. This keeps the + * generated schema identical to its pre-codec shape, minus the warning noise. + * + * To expose them later, drop the behavior override below; the codec is already + * mapped to the String scalar, so the columns would surface as text. For a + * dedicated scalar instead, register one and call `setGraphQLTypeForPgCodec`, + * mirroring the upstream PgLtreePlugin. + * + * Modeled on graphile-build-pg's PgLtreePlugin. + * @see https://postgraphile.org/postgraphile/next/extending-raw + */ + +import { gatherConfig } from "postgraphile/graphile-build"; + +/** + * Negative behaviors applied to every vector-typed attribute so it is excluded + * from the schema entirely - core field/condition/order behaviors plus the + * @graphile/pg-aggregates participation (aggregate, groupBy, havingBy, and the + * aggregate orderBy/filterBy scopes). + * + * pg-aggregates only registers spec-prefixed behavior strings in the + * `BehaviorString` type (e.g. `distinctCount:attribute:aggregate`), but the + * runtime matches behaviors positionally against the suffix, so these generic + * forms validly disable every spec at once. They are absent from the type + * union, hence the cast. + */ +const HIDDEN_ATTRIBUTE_BEHAVIORS = [ + "-attribute:base", + "-attribute:select", + "-attribute:insert", + "-attribute:update", + "-attribute:filterBy", + "-attribute:orderBy", + "-attribute:groupBy", + "-attribute:havingBy", + "-attribute:aggregate", + "-attribute:aggregate:orderBy", + "-attribute:aggregate:filterBy", +] as GraphileBuild.BehaviorString[]; + +const PgVectorPlugin: GraphileConfig.Plugin = { + name: "PgVectorPlugin", + version: "0.0.0", + description: "Adds a PgCodec for the pgvector `vector` type.", + + gather: gatherConfig({ + initialState: (_cache, { lib }) => { + const { + dataplanPg: { listOfCodec }, + graphileBuild: { EXPORTABLE }, + sql, + } = lib; + + // pgvector serializes as a text literal (e.g. "[1,2,3]"), so a passthrough + // text codec is sufficient for values to round-trip through the registry. + const vectorCodec = EXPORTABLE( + (sql) => ({ + name: "vector", + sqlType: sql`vector`, + toPg: (str: string) => str, + fromPg: (str: string) => str, + executor: null, + attributes: undefined, + }), + [sql], + ); + + const vectorArrayCodec = EXPORTABLE( + (listOfCodec, vectorCodec) => listOfCodec(vectorCodec), + [listOfCodec, vectorCodec], + ); + + return { vectorCodec, vectorArrayCodec }; + }, + + hooks: { + async pgCodecs_findPgCodec(info, event) { + // Another plugin already supplied a codec; skip. + if (event.pgCodec) return; + + const { serviceName, pgType } = event; + const { typname } = pgType; + if (typname !== "vector" && typname !== "_vector") return; + + // Only claim types that belong to the pgvector extension, so we don't + // shadow an unrelated user-defined type that happens to be named the same. + const vectorExt = await info.helpers.pgIntrospection.getExtensionByName( + serviceName, + "vector", + ); + if (!vectorExt || pgType.typnamespace !== vectorExt.extnamespace) + return; + + event.pgCodec = + typname === "vector" + ? info.state.vectorCodec + : info.state.vectorArrayCodec; + }, + }, + }), + + schema: { + hooks: { + // graphile-build-pg walks every registered codec to assign it a GraphQL + // type and warns ("Do not know how to convert PgCodec 'vector'...") for any + // scalar it can't map. The columns are already hidden by the behavior + // override below (behavior is checked before type resolution, so they stay + // out of the schema), but the codec still needs *some* type to silence that + // pass. Map it to the built-in String scalar - representable as text, and + // never surfaced because no field references it. + init(_, build) { + const codec = build.pgCodecs.vector; + if (codec && !build.hasGraphQLTypeForPgCodec(codec)) { + build.setGraphQLTypeForPgCodec(codec, "output", "String"); + build.setGraphQLTypeForPgCodec(codec, "input", "String"); + } + return _; + }, + }, + entityBehavior: { + // Strip all behaviors from vector-typed attributes so they never surface + // in the schema. Runs after the inferred defaults so these negations win. + pgCodecAttribute: { + inferred: { + provides: ["pgVectorHidden"], + after: ["default"], + callback(behavior, [codec, attributeName]) { + const attributeCodec = codec.attributes?.[attributeName]?.codec; + const isVector = + attributeCodec?.name === "vector" || + attributeCodec?.arrayOfCodec?.name === "vector"; + + if (!isVector) return behavior; + + return [behavior, ...HIDDEN_ATTRIBUTE_BEHAVIORS]; + }, + }, + }, + }, + }, +}; + +export default PgVectorPlugin; diff --git a/src/lib/graphql/plugins/codecs/index.ts b/src/lib/graphql/plugins/codecs/index.ts new file mode 100644 index 0000000..a04a33d --- /dev/null +++ b/src/lib/graphql/plugins/codecs/index.ts @@ -0,0 +1 @@ +export { default as PgVectorPlugin } from "./PgVector.plugin"; From 1299abef76413187b10a5a54cbec4f5eb4bdc648 Mon Sep 17 00:00:00 2001 From: hobbescodes Date: Tue, 16 Jun 2026 15:44:04 -0400 Subject: [PATCH 5/5] build: update generated schema --- src/generated/graphql/schema.executable.ts | 1983 ++++++++++---------- src/generated/graphql/schema.graphql | 736 ++++---- 2 files changed, 1379 insertions(+), 1340 deletions(-) diff --git a/src/generated/graphql/schema.executable.ts b/src/generated/graphql/schema.executable.ts index 8953d55..f3c1fb6 100644 --- a/src/generated/graphql/schema.executable.ts +++ b/src/generated/graphql/schema.executable.ts @@ -118,7 +118,7 @@ const spec_postTag = { } }, extensions: { - oid: "739621", + oid: "111366", isTableLike: true, pg: { serviceName: "main", @@ -199,7 +199,7 @@ const spec_tag = { } }, extensions: { - oid: "739634", + oid: "111379", isTableLike: true, pg: { serviceName: "main", @@ -289,7 +289,7 @@ const spec_comment = { } }, extensions: { - oid: "270503", + oid: "110547", isTableLike: true, pg: { serviceName: "main", @@ -389,7 +389,7 @@ const spec_user = { } }, extensions: { - oid: "270635", + oid: "110679", isTableLike: true, pg: { serviceName: "main", @@ -400,10 +400,24 @@ const spec_user = { executor: executor }; const userCodec = recordCodec(spec_user); -const projectLinkIdentifier = sql.identifier("public", "project_link"); -const spec_projectLink = { - name: "projectLink", - identifier: projectLinkIdentifier, +const voteIdentifier = sql.identifier("public", "vote"); +const voteTypeCodec = enumCodec({ + name: "voteType", + identifier: sql.identifier("public", "vote_type"), + values: ["up", "down"], + description: undefined, + extensions: { + oid: "110530", + pg: { + serviceName: "main", + schemaName: "public", + name: "vote_type" + } + } +}); +const spec_vote = { + name: "vote", + identifier: voteIdentifier, attributes: { __proto__: null, id: { @@ -417,7 +431,7 @@ const spec_projectLink = { canUpdate: true } }, - project_id: { + post_id: { codec: TYPES.uuid, notNull: true, extensions: { @@ -427,8 +441,8 @@ const spec_projectLink = { canUpdate: true } }, - url: { - codec: TYPES.text, + user_id: { + codec: TYPES.uuid, notNull: true, extensions: { __proto__: null, @@ -437,19 +451,9 @@ const spec_projectLink = { canUpdate: true } }, - title: { - codec: TYPES.text, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - order: { - codec: TYPES.int, + vote_type: { + codec: voteTypeCodec, notNull: true, - hasDefault: true, extensions: { __proto__: null, canSelect: true, @@ -481,21 +485,21 @@ const spec_projectLink = { } }, extensions: { - oid: "300307", + oid: "110700", isTableLike: true, pg: { serviceName: "main", schemaName: "public", - name: "project_link" + name: "vote" } }, executor: executor }; -const projectLinkCodec = recordCodec(spec_projectLink); -const statusTemplateIdentifier = sql.identifier("public", "status_template"); -const spec_statusTemplate = { - name: "statusTemplate", - identifier: statusTemplateIdentifier, +const voteCodec = recordCodec(spec_vote); +const projectLinkIdentifier = sql.identifier("public", "project_link"); +const spec_projectLink = { + name: "projectLink", + identifier: projectLinkIdentifier, attributes: { __proto__: null, id: { @@ -509,7 +513,7 @@ const spec_statusTemplate = { canUpdate: true } }, - organization_id: { + project_id: { codec: TYPES.uuid, notNull: true, extensions: { @@ -519,17 +523,7 @@ const spec_statusTemplate = { canUpdate: true } }, - name: { - codec: TYPES.text, - notNull: true, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - display_name: { + url: { codec: TYPES.text, notNull: true, extensions: { @@ -539,16 +533,7 @@ const spec_statusTemplate = { canUpdate: true } }, - color: { - codec: TYPES.text, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - description: { + title: { codec: TYPES.text, extensions: { __proto__: null, @@ -557,8 +542,9 @@ const spec_statusTemplate = { canUpdate: true } }, - sort_order: { + order: { codec: TYPES.int, + notNull: true, hasDefault: true, extensions: { __proto__: null, @@ -591,35 +577,21 @@ const spec_statusTemplate = { } }, extensions: { - oid: "270616", + oid: "110860", isTableLike: true, pg: { serviceName: "main", schemaName: "public", - name: "status_template" + name: "project_link" } }, executor: executor }; -const statusTemplateCodec = recordCodec(spec_statusTemplate); -const voteIdentifier = sql.identifier("public", "vote"); -const voteTypeCodec = enumCodec({ - name: "voteType", - identifier: sql.identifier("public", "vote_type"), - values: ["up", "down"], - description: undefined, - extensions: { - oid: "270486", - pg: { - serviceName: "main", - schemaName: "public", - name: "vote_type" - } - } -}); -const spec_vote = { - name: "vote", - identifier: voteIdentifier, +const projectLinkCodec = recordCodec(spec_projectLink); +const statusTemplateIdentifier = sql.identifier("public", "status_template"); +const spec_statusTemplate = { + name: "statusTemplate", + identifier: statusTemplateIdentifier, attributes: { __proto__: null, id: { @@ -633,7 +605,7 @@ const spec_vote = { canUpdate: true } }, - post_id: { + organization_id: { codec: TYPES.uuid, notNull: true, extensions: { @@ -643,8 +615,8 @@ const spec_vote = { canUpdate: true } }, - user_id: { - codec: TYPES.uuid, + name: { + codec: TYPES.text, notNull: true, extensions: { __proto__: null, @@ -653,8 +625,8 @@ const spec_vote = { canUpdate: true } }, - vote_type: { - codec: voteTypeCodec, + display_name: { + codec: TYPES.text, notNull: true, extensions: { __proto__: null, @@ -663,6 +635,34 @@ const spec_vote = { canUpdate: true } }, + color: { + codec: TYPES.text, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + description: { + codec: TYPES.text, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + sort_order: { + codec: TYPES.int, + hasDefault: true, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, created_at: { codec: TYPES.timestamptz, notNull: true, @@ -687,17 +687,17 @@ const spec_vote = { } }, extensions: { - oid: "270656", + oid: "110660", isTableLike: true, pg: { serviceName: "main", schemaName: "public", - name: "vote" + name: "status_template" } }, executor: executor }; -const voteCodec = recordCodec(spec_vote); +const statusTemplateCodec = recordCodec(spec_statusTemplate); const projectStatusConfigIdentifier = sql.identifier("public", "project_status_config"); const spec_projectStatusConfig = { name: "projectStatusConfig", @@ -795,7 +795,7 @@ const spec_projectStatusConfig = { } }, extensions: { - oid: "270599", + oid: "110643", isTableLike: true, pg: { serviceName: "main", @@ -806,97 +806,6 @@ const spec_projectStatusConfig = { executor: executor }; const projectStatusConfigCodec = recordCodec(spec_projectStatusConfig); -const signalClusterIdentifier = sql.identifier("public", "signal_cluster"); -const spec_signalCluster = { - name: "signalCluster", - identifier: signalClusterIdentifier, - attributes: { - __proto__: null, - id: { - codec: TYPES.uuid, - notNull: true, - hasDefault: true, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - project_id: { - codec: TYPES.uuid, - notNull: true, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - label: { - codec: TYPES.text, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - summary: { - codec: TYPES.text, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - member_count: { - codec: TYPES.int, - notNull: true, - hasDefault: true, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - created_at: { - codec: TYPES.timestamptz, - notNull: true, - hasDefault: true, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - updated_at: { - codec: TYPES.timestamptz, - notNull: true, - hasDefault: true, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - } - }, - extensions: { - oid: "731880", - isTableLike: true, - pg: { - serviceName: "main", - schemaName: "public", - name: "signal_cluster" - } - }, - executor: executor -}; -const signalClusterCodec = recordCodec(spec_signalCluster); const attachmentIdentifier = sql.identifier("public", "attachment"); const spec_attachment = { name: "attachment", @@ -1014,7 +923,7 @@ const spec_attachment = { } }, extensions: { - oid: "708031", + oid: "110955", isTableLike: true, pg: { serviceName: "main", @@ -1117,7 +1026,7 @@ const spec_wardenSyncQueue = { } }, extensions: { - oid: "706846", + oid: "110894", isTableLike: true, pg: { serviceName: "main", @@ -1128,10 +1037,22 @@ const spec_wardenSyncQueue = { executor: executor }; const wardenSyncQueueCodec = recordCodec(spec_wardenSyncQueue); -const projectIdentifier = sql.identifier("public", "project"); -const spec_project = { - name: "project", - identifier: projectIdentifier, +const signalClusterIdentifier = sql.identifier("public", "signal_cluster"); +const spec_signalCluster_attributes_centroid_codec_vector = { + name: "vector", + sqlType: sql`vector`, + toPg(str) { + return str; + }, + fromPg(str) { + return str; + }, + executor: null, + attributes: void 0 +}; +const spec_signalCluster = { + name: "signalCluster", + identifier: signalClusterIdentifier, attributes: { __proto__: null, id: { @@ -1145,8 +1066,8 @@ const spec_project = { canUpdate: true } }, - name: { - codec: TYPES.text, + project_id: { + codec: TYPES.uuid, notNull: true, extensions: { __proto__: null, @@ -1155,7 +1076,7 @@ const spec_project = { canUpdate: true } }, - image: { + label: { codec: TYPES.text, extensions: { __proto__: null, @@ -1164,7 +1085,107 @@ const spec_project = { canUpdate: true } }, - slug: { + summary: { + codec: TYPES.text, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + centroid: { + codec: spec_signalCluster_attributes_centroid_codec_vector, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + member_count: { + codec: TYPES.int, + notNull: true, + hasDefault: true, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + created_at: { + codec: TYPES.timestamptz, + notNull: true, + hasDefault: true, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + updated_at: { + codec: TYPES.timestamptz, + notNull: true, + hasDefault: true, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + } + }, + extensions: { + oid: "111313", + isTableLike: true, + pg: { + serviceName: "main", + schemaName: "public", + name: "signal_cluster" + } + }, + executor: executor +}; +const signalClusterCodec = recordCodec(spec_signalCluster); +const projectIdentifier = sql.identifier("public", "project"); +const spec_project = { + name: "project", + identifier: projectIdentifier, + attributes: { + __proto__: null, + id: { + codec: TYPES.uuid, + notNull: true, + hasDefault: true, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + name: { + codec: TYPES.text, + notNull: true, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + image: { + codec: TYPES.text, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + slug: { codec: TYPES.text, notNull: true, extensions: { @@ -1261,7 +1282,7 @@ const spec_project = { } }, extensions: { - oid: "270566", + oid: "110610", isTableLike: true, pg: { serviceName: "main", @@ -1371,7 +1392,6 @@ const spec_post = { }, number: { codec: TYPES.int, - notNull: true, extensions: { tags: { behavior: "-attribute:insert -attribute:update" @@ -1409,6 +1429,15 @@ const spec_post = { canUpdate: true } }, + embedding: { + codec: spec_signalCluster_attributes_centroid_codec_vector, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, duplicate_of_id: { codec: TYPES.uuid, extensions: { @@ -1438,7 +1467,7 @@ const spec_post = { } }, extensions: { - oid: "270549", + oid: "110593", isTableLike: true, pg: { serviceName: "main", @@ -1592,6 +1621,15 @@ const spec_signal = { canUpdate: true } }, + embedding: { + codec: spec_signalCluster_attributes_centroid_codec_vector, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, cluster_id: { codec: TYPES.uuid, extensions: { @@ -1603,7 +1641,7 @@ const spec_signal = { } }, extensions: { - oid: "706866", + oid: "110914", isTableLike: true, pg: { serviceName: "main", @@ -1749,6 +1787,37 @@ const user_resourceOptionsConfig = { }, uniques: userUniques }; +const voteUniques = [{ + attributes: ["id"], + isPrimary: true +}, { + attributes: ["post_id", "user_id"], + extensions: { + tags: { + __proto__: null, + behavior: ["-update", "-delete"] + } + } +}]; +const vote_resourceOptionsConfig = { + executor: executor, + name: "vote", + identifier: "main.public.vote", + from: voteIdentifier, + codec: voteCodec, + extensions: { + pg: { + serviceName: "main", + schemaName: "public", + name: "vote" + }, + canSelect: true, + canInsert: true, + canUpdate: true, + canDelete: true + }, + uniques: voteUniques +}; const project_linkUniques = [{ attributes: ["id"], isPrimary: true @@ -1803,37 +1872,6 @@ const status_template_resourceOptionsConfig = { }, uniques: status_templateUniques }; -const voteUniques = [{ - attributes: ["id"], - isPrimary: true -}, { - attributes: ["post_id", "user_id"], - extensions: { - tags: { - __proto__: null, - behavior: ["-update", "-delete"] - } - } -}]; -const vote_resourceOptionsConfig = { - executor: executor, - name: "vote", - identifier: "main.public.vote", - from: voteIdentifier, - codec: voteCodec, - extensions: { - pg: { - serviceName: "main", - schemaName: "public", - name: "vote" - }, - canSelect: true, - canInsert: true, - canUpdate: true, - canDelete: true - }, - uniques: voteUniques -}; const project_status_configUniques = [{ attributes: ["id"], isPrimary: true @@ -1865,56 +1903,56 @@ const project_status_config_resourceOptionsConfig = { }, uniques: project_status_configUniques }; -const signal_clusterUniques = [{ +const attachmentUniques = [{ attributes: ["id"], isPrimary: true }]; -const signal_cluster_resourceOptionsConfig = { +const attachment_resourceOptionsConfig = { executor: executor, - name: "signal_cluster", - identifier: "main.public.signal_cluster", - from: signalClusterIdentifier, - codec: signalClusterCodec, + name: "attachment", + identifier: "main.public.attachment", + from: attachmentIdentifier, + codec: attachmentCodec, extensions: { pg: { serviceName: "main", schemaName: "public", - name: "signal_cluster" + name: "attachment" }, canSelect: true, canInsert: true, canUpdate: true, canDelete: true }, - uniques: signal_clusterUniques + uniques: attachmentUniques }; -const attachmentUniques = [{ +const warden_sync_queueUniques = [{ attributes: ["id"], isPrimary: true }]; -const attachment_resourceOptionsConfig = { +const signal_clusterUniques = [{ + attributes: ["id"], + isPrimary: true +}]; +const signal_cluster_resourceOptionsConfig = { executor: executor, - name: "attachment", - identifier: "main.public.attachment", - from: attachmentIdentifier, - codec: attachmentCodec, + name: "signal_cluster", + identifier: "main.public.signal_cluster", + from: signalClusterIdentifier, + codec: signalClusterCodec, extensions: { pg: { serviceName: "main", schemaName: "public", - name: "attachment" + name: "signal_cluster" }, canSelect: true, canInsert: true, canUpdate: true, canDelete: true }, - uniques: attachmentUniques + uniques: signal_clusterUniques }; -const warden_sync_queueUniques = [{ - attributes: ["id"], - isPrimary: true -}]; const projectUniques = [{ attributes: ["id"], isPrimary: true @@ -2025,17 +2063,18 @@ const registryConfig = { text: TYPES.text, comment: commentCodec, user: userCodec, + vote: voteCodec, + voteType: voteTypeCodec, projectLink: projectLinkCodec, int4: TYPES.int, statusTemplate: statusTemplateCodec, - vote: voteCodec, - voteType: voteTypeCodec, projectStatusConfig: projectStatusConfigCodec, bool: TYPES.boolean, - signalCluster: signalClusterCodec, attachment: attachmentCodec, wardenSyncQueue: wardenSyncQueueCodec, jsonb: TYPES.jsonb, + signalCluster: signalClusterCodec, + vector: spec_signalCluster_attributes_centroid_codec_vector, project: projectCodec, varchar: TYPES.varchar, post: postCodec, @@ -2047,11 +2086,10 @@ const registryConfig = { tag: tag_resourceOptionsConfig, comment: comment_resourceOptionsConfig, user: user_resourceOptionsConfig, + vote: vote_resourceOptionsConfig, project_link: project_link_resourceOptionsConfig, status_template: status_template_resourceOptionsConfig, - vote: vote_resourceOptionsConfig, project_status_config: project_status_config_resourceOptionsConfig, - signal_cluster: signal_cluster_resourceOptionsConfig, attachment: attachment_resourceOptionsConfig, warden_sync_queue: { executor: executor, @@ -2072,6 +2110,7 @@ const registryConfig = { }, uniques: warden_sync_queueUniques }, + signal_cluster: signal_cluster_resourceOptionsConfig, project: project_resourceOptionsConfig, signal: signal_resourceOptionsConfig, post: post_resourceOptionsConfig @@ -3791,6 +3830,10 @@ function UserInput_emailApply(obj, val, info) { function UserInput_avatarUrlApply(obj, val, info) { obj.set("avatar_url", bakedInputRuntime(info.schema, info.field.type, val)); } +const CreateVotePayload_voteEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_votePgResource, voteUniques[0].attributes, $mutation, fieldArgs); +function VoteInput_voteTypeApply(obj, val, info) { + obj.set("vote_type", bakedInputRuntime(info.schema, info.field.type, val)); +} const CreateProjectLinkPayload_projectLinkEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_project_linkPgResource, project_linkUniques[0].attributes, $mutation, fieldArgs); function ProjectLinkInput_urlApply(obj, val, info) { obj.set("url", bakedInputRuntime(info.schema, info.field.type, val)); @@ -3814,10 +3857,6 @@ function StatusTemplateInput_descriptionApply(obj, val, info) { function StatusTemplateInput_sortOrderApply(obj, val, info) { obj.set("sort_order", bakedInputRuntime(info.schema, info.field.type, val)); } -const CreateVotePayload_voteEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_votePgResource, voteUniques[0].attributes, $mutation, fieldArgs); -function VoteInput_voteTypeApply(obj, val, info) { - obj.set("vote_type", bakedInputRuntime(info.schema, info.field.type, val)); -} const CreateProjectStatusConfigPayload_projectStatusConfigEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_project_status_configPgResource, project_status_configUniques[0].attributes, $mutation, fieldArgs); function ProjectStatusConfigInput_statusTemplateIdApply(obj, val, info) { obj.set("status_template_id", bakedInputRuntime(info.schema, info.field.type, val)); @@ -3834,16 +3873,6 @@ function ProjectStatusConfigInput_isEnabledApply(obj, val, info) { function ProjectStatusConfigInput_isDefaultApply(obj, val, info) { obj.set("is_default", bakedInputRuntime(info.schema, info.field.type, val)); } -const CreateSignalClusterPayload_signalClusterEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_signal_clusterPgResource, signal_clusterUniques[0].attributes, $mutation, fieldArgs); -function SignalClusterInput_labelApply(obj, val, info) { - obj.set("label", bakedInputRuntime(info.schema, info.field.type, val)); -} -function SignalClusterInput_summaryApply(obj, val, info) { - obj.set("summary", bakedInputRuntime(info.schema, info.field.type, val)); -} -function SignalClusterInput_memberCountApply(obj, val, info) { - obj.set("member_count", bakedInputRuntime(info.schema, info.field.type, val)); -} const CreateAttachmentPayload_attachmentEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_attachmentPgResource, attachmentUniques[0].attributes, $mutation, fieldArgs); function AttachmentInput_storageKeyApply(obj, val, info) { obj.set("storage_key", bakedInputRuntime(info.schema, info.field.type, val)); @@ -3882,6 +3911,16 @@ function WardenSyncQueueInput_lastErrorApply(obj, val, info) { function WardenSyncQueueInput_nextRetryAtApply(obj, val, info) { obj.set("next_retry_at", bakedInputRuntime(info.schema, info.field.type, val)); } +const CreateSignalClusterPayload_signalClusterEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_signal_clusterPgResource, signal_clusterUniques[0].attributes, $mutation, fieldArgs); +function SignalClusterInput_labelApply(obj, val, info) { + obj.set("label", bakedInputRuntime(info.schema, info.field.type, val)); +} +function SignalClusterInput_summaryApply(obj, val, info) { + obj.set("summary", bakedInputRuntime(info.schema, info.field.type, val)); +} +function SignalClusterInput_memberCountApply(obj, val, info) { + obj.set("member_count", bakedInputRuntime(info.schema, info.field.type, val)); +} const CreateProjectPayload_projectEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_projectPgResource, projectUniques[0].attributes, $mutation, fieldArgs); function ProjectInput_imageApply(obj, val, info) { obj.set("image", bakedInputRuntime(info.schema, info.field.type, val)); @@ -4154,15 +4193,66 @@ const planWrapper5 = (plan, _, fieldArgs) => { }); return plan(); }; -function oldPlan7(_, args) { - const $insert = pgInsertSingle(otherSource_project_linkPgResource); +function oldPlan6(_, args) { + const $insert = pgInsertSingle(otherSource_votePgResource); args.apply($insert); return object({ result: $insert }); } const planWrapper6 = (plan, _, fieldArgs) => { - const $input = fieldArgs.getRaw(["input", "projectLink"]), + const $result = plan(), + $input = fieldArgs.getRaw(["input", "vote"]), + $db = context().get("db"); + sideEffect([$result, $input, $db], async ([result, input, db]) => { + if (!result) return; + const { + postId + } = input, + voteId = result?.id; + if (!voteId) return; + const post = await db.query.posts.findFirst({ + where(table, { + eq + }) { + return eq(table.id, postId); + }, + with: { + project: { + columns: { + organizationId: !0 + } + } + } + }); + if (!post?.project) return; + try { + await events.emit({ + type: "backfeed.vote.created", + data: { + voteId, + postId, + projectId: post.projectId, + organizationId: post.project.organizationId + }, + organizationId: post.project.organizationId, + subject: voteId + }); + } catch (error) { + console.error("[Events] Failed to emit vote.created:", error); + } + }); + return $result; +}; +function oldPlan8(_, args) { + const $insert = pgInsertSingle(otherSource_project_linkPgResource); + args.apply($insert); + return object({ + result: $insert + }); +} +const planWrapper7 = (plan, _, fieldArgs) => { + const $input = fieldArgs.getRaw(["input", "projectLink"]), $observer = context().get("observer"), $db = context().get("db"); sideEffect([$input, $observer, $db], async ([input, observer, db]) => { @@ -4184,25 +4274,25 @@ const planWrapper6 = (plan, _, fieldArgs) => { }); return plan(); }; -function oldPlan6(...planParams) { +function oldPlan7(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan7.apply(this, args); + $prev = oldPlan8.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.createProjectLink, but that function did not return a step! -${String(oldPlan7)}`); +${String(oldPlan8)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper6(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper7(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; } -const planWrapper7 = (plan, _, fieldArgs) => { +const planWrapper8 = (plan, _, fieldArgs) => { const $result = plan(), $input = fieldArgs.getRaw(["input", "projectLink"]), $db = context().get("db"); @@ -4241,14 +4331,14 @@ const planWrapper7 = (plan, _, fieldArgs) => { }); return $result; }; -function oldPlan9(_, args) { +function oldPlan10(_, args) { const $insert = pgInsertSingle(otherSource_status_templatePgResource); args.apply($insert); return object({ result: $insert }); } -const planWrapper8 = (plan, _, fieldArgs) => { +const planWrapper9 = (plan, _, fieldArgs) => { const $input = fieldArgs.getRaw(["input", "statusTemplate"]), $observer = context().get("observer"), $db = context().get("db"); @@ -4260,25 +4350,25 @@ const planWrapper8 = (plan, _, fieldArgs) => { }); return plan(); }; -function oldPlan8(...planParams) { +function oldPlan9(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan9.apply(this, args); + $prev = oldPlan10.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.createStatusTemplate, but that function did not return a step! -${String(oldPlan9)}`); +${String(oldPlan10)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper8(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper9(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; } -const planWrapper9 = (plan, _, fieldArgs) => { +const planWrapper10 = (plan, _, fieldArgs) => { const $result = plan(), $input = fieldArgs.getRaw(["input", "statusTemplate"]); sideEffect([$result, $input], async ([result, input]) => { @@ -4304,57 +4394,6 @@ const planWrapper9 = (plan, _, fieldArgs) => { }); return $result; }; -function oldPlan10(_, args) { - const $insert = pgInsertSingle(otherSource_votePgResource); - args.apply($insert); - return object({ - result: $insert - }); -} -const planWrapper10 = (plan, _, fieldArgs) => { - const $result = plan(), - $input = fieldArgs.getRaw(["input", "vote"]), - $db = context().get("db"); - sideEffect([$result, $input, $db], async ([result, input, db]) => { - if (!result) return; - const { - postId - } = input, - voteId = result?.id; - if (!voteId) return; - const post = await db.query.posts.findFirst({ - where(table, { - eq - }) { - return eq(table.id, postId); - }, - with: { - project: { - columns: { - organizationId: !0 - } - } - } - }); - if (!post?.project) return; - try { - await events.emit({ - type: "backfeed.vote.created", - data: { - voteId, - postId, - projectId: post.projectId, - organizationId: post.project.organizationId - }, - organizationId: post.project.organizationId, - subject: voteId - }); - } catch (error) { - console.error("[Events] Failed to emit vote.created:", error); - } - }); - return $result; -}; function oldPlan12(_, args) { const $insert = pgInsertSingle(otherSource_project_status_configPgResource); args.apply($insert); @@ -5055,7 +5094,7 @@ const planWrapper26 = (plan, _, fieldArgs) => { return plan(); }; const oldPlan28 = (_$root, args) => { - const $update = pgUpdateSingle(otherSource_project_linkPgResource, { + const $update = pgUpdateSingle(otherSource_votePgResource, { id: args.getRaw(['input', "rowId"]) }); args.apply($update); @@ -5064,6 +5103,93 @@ const oldPlan28 = (_$root, args) => { }); }; const planWrapper27 = (plan, _, fieldArgs) => { + const $input = fieldArgs.getRaw(["input", "rowId"]), + $observer = context().get("observer"), + $db = context().get("db"); + sideEffect([$input, $observer, $db], async ([input, observer, db]) => { + if (!observer) throw Error("Unauthorized"); + const vote = await db.query.votes.findFirst({ + where(table, { + eq + }) { + return eq(table.id, input); + } + }); + if (observer.id !== vote?.userId) throw Error("Unauthorized"); + }); + return plan(); +}; +function oldPlan27(...planParams) { + const smartPlan = (...overrideParams) => { + const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], + $prev = oldPlan28.apply(this, args); + if (!($prev instanceof ExecutableStep)) { + console.error(`Wrapped a plan function at Mutation.updateVote, but that function did not return a step! +${String(oldPlan28)}`); + throw Error("Wrapped a plan function, but that function did not return a step!"); + } + args[1].autoApply($prev); + return $prev; + }, + [$source, fieldArgs, info] = planParams, + $newPlan = planWrapper27(smartPlan, $source, fieldArgs, info); + if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); + if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); + return $newPlan; +} +const planWrapper28 = (plan, _, fieldArgs) => { + const $result = plan(), + $voteId = fieldArgs.getRaw(["input", "rowId"]), + $db = context().get("db"); + sideEffect([$result, $voteId, $db], async ([result, voteId, db]) => { + if (!result) return; + const vote = await db.query.votes.findFirst({ + where(table, { + eq + }) { + return eq(table.id, voteId); + }, + with: { + post: { + with: { + project: { + columns: { + organizationId: !0 + } + } + } + } + } + }); + if (!vote?.post?.project) return; + try { + await events.emit({ + type: "backfeed.vote.updated", + data: { + voteId, + postId: vote.postId, + projectId: vote.post.projectId, + organizationId: vote.post.project.organizationId + }, + organizationId: vote.post.project.organizationId, + subject: voteId + }); + } catch (error) { + console.error("[Events] Failed to emit vote.updated:", error); + } + }); + return $result; +}; +const oldPlan30 = (_$root, args) => { + const $update = pgUpdateSingle(otherSource_project_linkPgResource, { + id: args.getRaw(['input', "rowId"]) + }); + args.apply($update); + return object({ + result: $update + }); +}; +const planWrapper29 = (plan, _, fieldArgs) => { const $input = fieldArgs.getRaw(["input", "rowId"]), $observer = context().get("observer"), $db = context().get("db"); @@ -5088,25 +5214,25 @@ const planWrapper27 = (plan, _, fieldArgs) => { }); return plan(); }; -function oldPlan27(...planParams) { +function oldPlan29(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan28.apply(this, args); + $prev = oldPlan30.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.updateProjectLink, but that function did not return a step! -${String(oldPlan28)}`); +${String(oldPlan30)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper27(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper29(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; } -const planWrapper28 = (plan, _, fieldArgs) => { +const planWrapper30 = (plan, _, fieldArgs) => { const $result = plan(), $linkId = fieldArgs.getRaw(["input", "rowId"]), $db = context().get("db"); @@ -5144,7 +5270,7 @@ const planWrapper28 = (plan, _, fieldArgs) => { }); return $result; }; -const oldPlan30 = (_$root, args) => { +const oldPlan32 = (_$root, args) => { const $update = pgUpdateSingle(otherSource_status_templatePgResource, { id: args.getRaw(['input', "rowId"]) }); @@ -5153,7 +5279,7 @@ const oldPlan30 = (_$root, args) => { result: $update }); }; -const planWrapper29 = (plan, _, fieldArgs) => { +const planWrapper31 = (plan, _, fieldArgs) => { const $input = fieldArgs.getRaw(["input", "rowId"]), $observer = context().get("observer"), $db = context().get("db"); @@ -5175,25 +5301,25 @@ const planWrapper29 = (plan, _, fieldArgs) => { }); return plan(); }; -function oldPlan29(...planParams) { +function oldPlan31(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan30.apply(this, args); + $prev = oldPlan32.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.updateStatusTemplate, but that function did not return a step! -${String(oldPlan30)}`); +${String(oldPlan32)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper29(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper31(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; } -const planWrapper30 = (plan, _, fieldArgs) => { +const planWrapper32 = (plan, _, fieldArgs) => { const $result = plan(), $templateId = fieldArgs.getRaw(["input", "rowId"]), $db = context().get("db"); @@ -5226,8 +5352,8 @@ const planWrapper30 = (plan, _, fieldArgs) => { }); return $result; }; -const oldPlan32 = (_$root, args) => { - const $update = pgUpdateSingle(otherSource_votePgResource, { +const oldPlan34 = (_$root, args) => { + const $update = pgUpdateSingle(otherSource_project_status_configPgResource, { id: args.getRaw(['input', "rowId"]) }); args.apply($update); @@ -5235,115 +5361,28 @@ const oldPlan32 = (_$root, args) => { result: $update }); }; -const planWrapper31 = (plan, _, fieldArgs) => { +const planWrapper33 = (plan, _, fieldArgs) => { const $input = fieldArgs.getRaw(["input", "rowId"]), $observer = context().get("observer"), $db = context().get("db"); sideEffect([$input, $observer, $db], async ([input, observer, db]) => { if (!observer) throw Error("Unauthorized"); - const vote = await db.query.votes.findFirst({ - where(table, { - eq - }) { - return eq(table.id, input); - } - }); - if (observer.id !== vote?.userId) throw Error("Unauthorized"); - }); - return plan(); -}; -function oldPlan31(...planParams) { - const smartPlan = (...overrideParams) => { - const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan32.apply(this, args); - if (!($prev instanceof ExecutableStep)) { - console.error(`Wrapped a plan function at Mutation.updateVote, but that function did not return a step! -${String(oldPlan32)}`); - throw Error("Wrapped a plan function, but that function did not return a step!"); - } - args[1].autoApply($prev); - return $prev; - }, - [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper31(smartPlan, $source, fieldArgs, info); - if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); - if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); - return $newPlan; -} -const planWrapper32 = (plan, _, fieldArgs) => { - const $result = plan(), - $voteId = fieldArgs.getRaw(["input", "rowId"]), - $db = context().get("db"); - sideEffect([$result, $voteId, $db], async ([result, voteId, db]) => { - if (!result) return; - const vote = await db.query.votes.findFirst({ - where(table, { - eq - }) { - return eq(table.id, voteId); - }, - with: { - post: { - with: { - project: { - columns: { - organizationId: !0 - } - } - } - } - } - }); - if (!vote?.post?.project) return; - try { - await events.emit({ - type: "backfeed.vote.updated", - data: { - voteId, - postId: vote.postId, - projectId: vote.post.projectId, - organizationId: vote.post.project.organizationId - }, - organizationId: vote.post.project.organizationId, - subject: voteId - }); - } catch (error) { - console.error("[Events] Failed to emit vote.updated:", error); - } - }); - return $result; -}; -const oldPlan34 = (_$root, args) => { - const $update = pgUpdateSingle(otherSource_project_status_configPgResource, { - id: args.getRaw(['input', "rowId"]) - }); - args.apply($update); - return object({ - result: $update - }); -}; -const planWrapper33 = (plan, _, fieldArgs) => { - const $input = fieldArgs.getRaw(["input", "rowId"]), - $observer = context().get("observer"), - $db = context().get("db"); - sideEffect([$input, $observer, $db], async ([input, observer, db]) => { - if (!observer) throw Error("Unauthorized"); - let organizationId; - { - const config = await db.query.projectStatusConfigs.findFirst({ - where(table, { - eq - }) { - return eq(table.id, input); - }, - with: { - project: !0 - } - }); - if (!config) throw Error("Project status config not found"); - organizationId = config.project.organizationId; - } - if (!(await checkPermission(observer.identityProviderId, "organization", organizationId, "admin"))) throw Error("Insufficient permissions"); + let organizationId; + { + const config = await db.query.projectStatusConfigs.findFirst({ + where(table, { + eq + }) { + return eq(table.id, input); + }, + with: { + project: !0 + } + }); + if (!config) throw Error("Project status config not found"); + organizationId = config.project.organizationId; + } + if (!(await checkPermission(observer.identityProviderId, "organization", organizationId, "admin"))) throw Error("Insufficient permissions"); }); return plan(); }; @@ -5871,6 +5910,76 @@ const planWrapper47 = (plan, _, fieldArgs) => { return plan(); }; const oldPlan49 = (_$root, args) => { + const $delete = pgDeleteSingle(otherSource_votePgResource, { + id: args.getRaw(['input', "rowId"]) + }); + args.apply($delete); + return object({ + result: $delete + }); +}; +function oldPlan48(...planParams) { + const smartPlan = (...overrideParams) => { + const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], + $prev = oldPlan49.apply(this, args); + if (!($prev instanceof ExecutableStep)) { + console.error(`Wrapped a plan function at Mutation.deleteVote, but that function did not return a step! +${String(oldPlan49)}`); + throw Error("Wrapped a plan function, but that function did not return a step!"); + } + args[1].autoApply($prev); + return $prev; + }, + [$source, fieldArgs, info] = planParams, + $newPlan = planWrapper27(smartPlan, $source, fieldArgs, info); + if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); + if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); + return $newPlan; +} +const planWrapper49 = (plan, _, fieldArgs) => { + const $result = plan(), + $voteId = fieldArgs.getRaw(["input", "rowId"]), + $db = context().get("db"); + sideEffect([$result, $voteId, $db], async ([result, voteId, db]) => { + if (!result) return; + const vote = await db.query.votes.findFirst({ + where(table, { + eq + }) { + return eq(table.id, voteId); + }, + with: { + post: { + with: { + project: { + columns: { + organizationId: !0 + } + } + } + } + } + }); + if (!vote?.post?.project) return; + try { + await events.emit({ + type: "backfeed.vote.deleted", + data: { + voteId, + postId: vote.postId, + projectId: vote.post.projectId, + organizationId: vote.post.project.organizationId + }, + organizationId: vote.post.project.organizationId, + subject: voteId + }); + } catch (error) { + console.error("[Events] Failed to emit vote.deleted:", error); + } + }); + return $result; +}; +const oldPlan51 = (_$root, args) => { const $delete = pgDeleteSingle(otherSource_project_linkPgResource, { id: args.getRaw(['input', "rowId"]) }); @@ -5879,7 +5988,7 @@ const oldPlan49 = (_$root, args) => { result: $delete }); }; -const planWrapper48 = (plan, _, fieldArgs) => { +const planWrapper50 = (plan, _, fieldArgs) => { const $input = fieldArgs.getRaw(["input", "rowId"]), $observer = context().get("observer"), $db = context().get("db"); @@ -5904,25 +6013,25 @@ const planWrapper48 = (plan, _, fieldArgs) => { }); return plan(); }; -function oldPlan48(...planParams) { +function oldPlan50(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan49.apply(this, args); + $prev = oldPlan51.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.deleteProjectLink, but that function did not return a step! -${String(oldPlan49)}`); +${String(oldPlan51)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper48(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper50(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; } -const planWrapper49 = (plan, _, fieldArgs) => { +const planWrapper51 = (plan, _, fieldArgs) => { const $result = plan(), $linkId = fieldArgs.getRaw(["input", "rowId"]), $db = context().get("db"); @@ -5960,7 +6069,7 @@ const planWrapper49 = (plan, _, fieldArgs) => { }); return $result; }; -const oldPlan51 = (_$root, args) => { +const oldPlan53 = (_$root, args) => { const $delete = pgDeleteSingle(otherSource_status_templatePgResource, { id: args.getRaw(['input', "rowId"]) }); @@ -5969,7 +6078,7 @@ const oldPlan51 = (_$root, args) => { result: $delete }); }; -const planWrapper50 = (plan, _, fieldArgs) => { +const planWrapper52 = (plan, _, fieldArgs) => { const $input = fieldArgs.getRaw(["input", "rowId"]), $observer = context().get("observer"), $db = context().get("db"); @@ -5991,25 +6100,25 @@ const planWrapper50 = (plan, _, fieldArgs) => { }); return plan(); }; -function oldPlan50(...planParams) { +function oldPlan52(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan51.apply(this, args); + $prev = oldPlan53.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.deleteStatusTemplate, but that function did not return a step! -${String(oldPlan51)}`); +${String(oldPlan53)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper50(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper52(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; } -const planWrapper51 = (plan, _, fieldArgs) => { +const planWrapper53 = (plan, _, fieldArgs) => { const $result = plan(), $templateId = fieldArgs.getRaw(["input", "rowId"]), $db = context().get("db"); @@ -6042,8 +6151,8 @@ const planWrapper51 = (plan, _, fieldArgs) => { }); return $result; }; -const oldPlan53 = (_$root, args) => { - const $delete = pgDeleteSingle(otherSource_votePgResource, { +const oldPlan55 = (_$root, args) => { + const $delete = pgDeleteSingle(otherSource_project_status_configPgResource, { id: args.getRaw(['input', "rowId"]) }); args.apply($delete); @@ -6051,143 +6160,73 @@ const oldPlan53 = (_$root, args) => { result: $delete }); }; -function oldPlan52(...planParams) { +const planWrapper54 = (plan, _, fieldArgs) => { + const $input = fieldArgs.getRaw(["input", "rowId"]), + $observer = context().get("observer"), + $db = context().get("db"); + sideEffect([$input, $observer, $db], async ([input, observer, db]) => { + if (!observer) throw Error("Unauthorized"); + let organizationId; + { + const config = await db.query.projectStatusConfigs.findFirst({ + where(table, { + eq + }) { + return eq(table.id, input); + }, + with: { + project: !0 + } + }); + if (!config) throw Error("Project status config not found"); + organizationId = config.project.organizationId; + } + if (!(await checkPermission(observer.identityProviderId, "organization", organizationId, "admin"))) throw Error("Insufficient permissions"); + }); + return plan(); +}; +function oldPlan54(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan53.apply(this, args); + $prev = oldPlan55.apply(this, args); if (!($prev instanceof ExecutableStep)) { - console.error(`Wrapped a plan function at Mutation.deleteVote, but that function did not return a step! -${String(oldPlan53)}`); + console.error(`Wrapped a plan function at Mutation.deleteProjectStatusConfig, but that function did not return a step! +${String(oldPlan55)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper31(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper54(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; } -const planWrapper53 = (plan, _, fieldArgs) => { +const planWrapper55 = (plan, _, fieldArgs) => { const $result = plan(), - $voteId = fieldArgs.getRaw(["input", "rowId"]), + $configId = fieldArgs.getRaw(["input", "rowId"]), $db = context().get("db"); - sideEffect([$result, $voteId, $db], async ([result, voteId, db]) => { + sideEffect([$result, $configId, $db], async ([result, configId, db]) => { if (!result) return; - const vote = await db.query.votes.findFirst({ + const config = await db.query.projectStatusConfigs.findFirst({ where(table, { eq }) { - return eq(table.id, voteId); + return eq(table.id, configId); }, with: { - post: { - with: { - project: { - columns: { - organizationId: !0 - } - } + project: { + columns: { + organizationId: !0 } } } }); - if (!vote?.post?.project) return; + if (!config?.project) return; try { await events.emit({ - type: "backfeed.vote.deleted", - data: { - voteId, - postId: vote.postId, - projectId: vote.post.projectId, - organizationId: vote.post.project.organizationId - }, - organizationId: vote.post.project.organizationId, - subject: voteId - }); - } catch (error) { - console.error("[Events] Failed to emit vote.deleted:", error); - } - }); - return $result; -}; -const oldPlan55 = (_$root, args) => { - const $delete = pgDeleteSingle(otherSource_project_status_configPgResource, { - id: args.getRaw(['input', "rowId"]) - }); - args.apply($delete); - return object({ - result: $delete - }); -}; -const planWrapper54 = (plan, _, fieldArgs) => { - const $input = fieldArgs.getRaw(["input", "rowId"]), - $observer = context().get("observer"), - $db = context().get("db"); - sideEffect([$input, $observer, $db], async ([input, observer, db]) => { - if (!observer) throw Error("Unauthorized"); - let organizationId; - { - const config = await db.query.projectStatusConfigs.findFirst({ - where(table, { - eq - }) { - return eq(table.id, input); - }, - with: { - project: !0 - } - }); - if (!config) throw Error("Project status config not found"); - organizationId = config.project.organizationId; - } - if (!(await checkPermission(observer.identityProviderId, "organization", organizationId, "admin"))) throw Error("Insufficient permissions"); - }); - return plan(); -}; -function oldPlan54(...planParams) { - const smartPlan = (...overrideParams) => { - const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan55.apply(this, args); - if (!($prev instanceof ExecutableStep)) { - console.error(`Wrapped a plan function at Mutation.deleteProjectStatusConfig, but that function did not return a step! -${String(oldPlan55)}`); - throw Error("Wrapped a plan function, but that function did not return a step!"); - } - args[1].autoApply($prev); - return $prev; - }, - [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper54(smartPlan, $source, fieldArgs, info); - if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); - if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); - return $newPlan; -} -const planWrapper55 = (plan, _, fieldArgs) => { - const $result = plan(), - $configId = fieldArgs.getRaw(["input", "rowId"]), - $db = context().get("db"); - sideEffect([$result, $configId, $db], async ([result, configId, db]) => { - if (!result) return; - const config = await db.query.projectStatusConfigs.findFirst({ - where(table, { - eq - }) { - return eq(table.id, configId); - }, - with: { - project: { - columns: { - organizationId: !0 - } - } - } - }); - if (!config?.project) return; - try { - await events.emit({ - type: "backfeed.projectStatusConfig.deleted", + type: "backfeed.projectStatusConfig.deleted", data: { projectStatusConfigId: configId, projectId: config.projectId, @@ -6550,7 +6589,7 @@ type Post { statusUpdatedAt: Datetime! createdAt: Datetime! updatedAt: Datetime! - number: Int! + number: Int source: String sentiment: String aiTags: JSON @@ -14634,6 +14673,51 @@ input UserInput { avatarUrl: String } +"""The output of our create \`Vote\` mutation.""" +type CreateVotePayload { + """ + 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 \`Vote\` that was created by this mutation.""" + vote: Vote + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our \`Vote\`. May be used by Relay 1.""" + voteEdge( + """The method to use when ordering \`Vote\`.""" + orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] + ): VoteEdge +} + +"""All input for the create \`Vote\` mutation.""" +input CreateVoteInput { + """ + 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 \`Vote\` to be created by this mutation.""" + vote: VoteInput! +} + +"""An input for mutations affecting \`Vote\`""" +input VoteInput { + rowId: UUID + postId: UUID! + userId: UUID! + voteType: VoteType! + createdAt: Datetime + updatedAt: Datetime +} + """The output of our create \`ProjectLink\` mutation.""" type CreateProjectLinkPayload { """ @@ -14728,51 +14812,6 @@ input StatusTemplateInput { updatedAt: Datetime } -"""The output of our create \`Vote\` mutation.""" -type CreateVotePayload { - """ - 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 \`Vote\` that was created by this mutation.""" - vote: Vote - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our \`Vote\`. May be used by Relay 1.""" - voteEdge( - """The method to use when ordering \`Vote\`.""" - orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] - ): VoteEdge -} - -"""All input for the create \`Vote\` mutation.""" -input CreateVoteInput { - """ - 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 \`Vote\` to be created by this mutation.""" - vote: VoteInput! -} - -"""An input for mutations affecting \`Vote\`""" -input VoteInput { - rowId: UUID - postId: UUID! - userId: UUID! - voteType: VoteType! - createdAt: Datetime - updatedAt: Datetime -} - """The output of our create \`ProjectStatusConfig\` mutation.""" type CreateProjectStatusConfigPayload { """ @@ -14821,52 +14860,6 @@ input ProjectStatusConfigInput { createdAt: Datetime } -"""The output of our create \`SignalCluster\` mutation.""" -type CreateSignalClusterPayload { - """ - 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 \`SignalCluster\` that was created by this mutation.""" - signalCluster: SignalCluster - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our \`SignalCluster\`. May be used by Relay 1.""" - signalClusterEdge( - """The method to use when ordering \`SignalCluster\`.""" - orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] - ): SignalClusterEdge -} - -"""All input for the create \`SignalCluster\` mutation.""" -input CreateSignalClusterInput { - """ - 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 \`SignalCluster\` to be created by this mutation.""" - signalCluster: SignalClusterInput! -} - -"""An input for mutations affecting \`SignalCluster\`""" -input SignalClusterInput { - rowId: UUID - projectId: UUID! - label: String - summary: String - memberCount: Int - createdAt: Datetime - updatedAt: Datetime -} - """The output of our create \`Attachment\` mutation.""" type CreateAttachmentPayload { """ @@ -14964,48 +14957,94 @@ input WardenSyncQueueInput { createdAt: Datetime } -"""The output of our create \`Project\` mutation.""" -type CreateProjectPayload { +"""The output of our create \`SignalCluster\` mutation.""" +type CreateSignalClusterPayload { """ 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 \`Project\` that was created by this mutation.""" - project: Project + """The \`SignalCluster\` that was created by this mutation.""" + signalCluster: SignalCluster """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our \`Project\`. May be used by Relay 1.""" - projectEdge( - """The method to use when ordering \`Project\`.""" - orderBy: [ProjectOrderBy!]! = [PRIMARY_KEY_ASC] - ): ProjectEdge + """An edge for our \`SignalCluster\`. May be used by Relay 1.""" + signalClusterEdge( + """The method to use when ordering \`SignalCluster\`.""" + orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] + ): SignalClusterEdge } -"""All input for the create \`Project\` mutation.""" -input CreateProjectInput { +"""All input for the create \`SignalCluster\` mutation.""" +input CreateSignalClusterInput { """ 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 \`Project\` to be created by this mutation.""" - project: ProjectInput! + """The \`SignalCluster\` to be created by this mutation.""" + signalCluster: SignalClusterInput! } -"""An input for mutations affecting \`Project\`""" -input ProjectInput { +"""An input for mutations affecting \`SignalCluster\`""" +input SignalClusterInput { rowId: UUID - name: String! - image: String - slug: String! - description: String + projectId: UUID! + label: String + summary: String + memberCount: Int + createdAt: Datetime + updatedAt: Datetime +} + +"""The output of our create \`Project\` mutation.""" +type CreateProjectPayload { + """ + 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 \`Project\` that was created by this mutation.""" + project: Project + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our \`Project\`. May be used by Relay 1.""" + projectEdge( + """The method to use when ordering \`Project\`.""" + orderBy: [ProjectOrderBy!]! = [PRIMARY_KEY_ASC] + ): ProjectEdge +} + +"""All input for the create \`Project\` mutation.""" +input CreateProjectInput { + """ + 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 \`Project\` to be created by this mutation.""" + project: ProjectInput! +} + +"""An input for mutations affecting \`Project\`""" +input ProjectInput { + rowId: UUID + name: String! + image: String + slug: String! + description: String organizationId: UUID! createdAt: Datetime updatedAt: Datetime @@ -15265,6 +15304,54 @@ input UserPatch { avatarUrl: String } +"""The output of our update \`Vote\` mutation.""" +type UpdateVotePayload { + """ + 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 \`Vote\` that was updated by this mutation.""" + vote: Vote + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our \`Vote\`. May be used by Relay 1.""" + voteEdge( + """The method to use when ordering \`Vote\`.""" + orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] + ): VoteEdge +} + +"""All input for the \`updateVote\` mutation.""" +input UpdateVoteInput { + """ + 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 \`Vote\` being updated. + """ + patch: VotePatch! +} + +"""Represents an update to a \`Vote\`. Fields that are set will be updated.""" +input VotePatch { + rowId: UUID + postId: UUID + userId: UUID + voteType: VoteType + createdAt: Datetime + updatedAt: Datetime +} + """The output of our update \`ProjectLink\` mutation.""" type UpdateProjectLinkPayload { """ @@ -15369,54 +15456,6 @@ input StatusTemplatePatch { updatedAt: Datetime } -"""The output of our update \`Vote\` mutation.""" -type UpdateVotePayload { - """ - 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 \`Vote\` that was updated by this mutation.""" - vote: Vote - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our \`Vote\`. May be used by Relay 1.""" - voteEdge( - """The method to use when ordering \`Vote\`.""" - orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] - ): VoteEdge -} - -"""All input for the \`updateVote\` mutation.""" -input UpdateVoteInput { - """ - 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 \`Vote\` being updated. - """ - patch: VotePatch! -} - -"""Represents an update to a \`Vote\`. Fields that are set will be updated.""" -input VotePatch { - rowId: UUID - postId: UUID - userId: UUID - voteType: VoteType - createdAt: Datetime - updatedAt: Datetime -} - """The output of our update \`ProjectStatusConfig\` mutation.""" type UpdateProjectStatusConfigPayload { """ @@ -15470,57 +15509,6 @@ input ProjectStatusConfigPatch { createdAt: Datetime } -"""The output of our update \`SignalCluster\` mutation.""" -type UpdateSignalClusterPayload { - """ - 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 \`SignalCluster\` that was updated by this mutation.""" - signalCluster: SignalCluster - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our \`SignalCluster\`. May be used by Relay 1.""" - signalClusterEdge( - """The method to use when ordering \`SignalCluster\`.""" - orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] - ): SignalClusterEdge -} - -"""All input for the \`updateSignalCluster\` mutation.""" -input UpdateSignalClusterInput { - """ - 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 \`SignalCluster\` being updated. - """ - patch: SignalClusterPatch! -} - -""" -Represents an update to a \`SignalCluster\`. Fields that are set will be updated. -""" -input SignalClusterPatch { - rowId: UUID - projectId: UUID - label: String - summary: String - memberCount: Int - createdAt: Datetime - updatedAt: Datetime -} - """The output of our update \`Attachment\` mutation.""" type UpdateAttachmentPayload { """ @@ -15628,6 +15616,57 @@ input WardenSyncQueuePatch { createdAt: Datetime } +"""The output of our update \`SignalCluster\` mutation.""" +type UpdateSignalClusterPayload { + """ + 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 \`SignalCluster\` that was updated by this mutation.""" + signalCluster: SignalCluster + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our \`SignalCluster\`. May be used by Relay 1.""" + signalClusterEdge( + """The method to use when ordering \`SignalCluster\`.""" + orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] + ): SignalClusterEdge +} + +"""All input for the \`updateSignalCluster\` mutation.""" +input UpdateSignalClusterInput { + """ + 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 \`SignalCluster\` being updated. + """ + patch: SignalClusterPatch! +} + +""" +Represents an update to a \`SignalCluster\`. Fields that are set will be updated. +""" +input SignalClusterPatch { + rowId: UUID + projectId: UUID + label: String + summary: String + memberCount: Int + createdAt: Datetime + updatedAt: Datetime +} + """The output of our update \`Project\` mutation.""" type UpdateProjectPayload { """ @@ -15872,31 +15911,31 @@ input DeleteUserInput { rowId: UUID! } -"""The output of our delete \`ProjectLink\` mutation.""" -type DeleteProjectLinkPayload { +"""The output of our delete \`Vote\` mutation.""" +type DeleteVotePayload { """ 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 \`ProjectLink\` that was deleted by this mutation.""" - projectLink: ProjectLink + """The \`Vote\` that was deleted by this mutation.""" + vote: Vote """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our \`ProjectLink\`. May be used by Relay 1.""" - projectLinkEdge( - """The method to use when ordering \`ProjectLink\`.""" - orderBy: [ProjectLinkOrderBy!]! = [PRIMARY_KEY_ASC] - ): ProjectLinkEdge + """An edge for our \`Vote\`. May be used by Relay 1.""" + voteEdge( + """The method to use when ordering \`Vote\`.""" + orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] + ): VoteEdge } -"""All input for the \`deleteProjectLink\` mutation.""" -input DeleteProjectLinkInput { +"""All input for the \`deleteVote\` mutation.""" +input DeleteVoteInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -15905,31 +15944,31 @@ input DeleteProjectLinkInput { rowId: UUID! } -"""The output of our delete \`StatusTemplate\` mutation.""" -type DeleteStatusTemplatePayload { +"""The output of our delete \`ProjectLink\` mutation.""" +type DeleteProjectLinkPayload { """ 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 \`StatusTemplate\` that was deleted by this mutation.""" - statusTemplate: StatusTemplate + """The \`ProjectLink\` that was deleted by this mutation.""" + projectLink: ProjectLink """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our \`StatusTemplate\`. May be used by Relay 1.""" - statusTemplateEdge( - """The method to use when ordering \`StatusTemplate\`.""" - orderBy: [StatusTemplateOrderBy!]! = [PRIMARY_KEY_ASC] - ): StatusTemplateEdge + """An edge for our \`ProjectLink\`. May be used by Relay 1.""" + projectLinkEdge( + """The method to use when ordering \`ProjectLink\`.""" + orderBy: [ProjectLinkOrderBy!]! = [PRIMARY_KEY_ASC] + ): ProjectLinkEdge } -"""All input for the \`deleteStatusTemplate\` mutation.""" -input DeleteStatusTemplateInput { +"""All input for the \`deleteProjectLink\` mutation.""" +input DeleteProjectLinkInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -15938,31 +15977,31 @@ input DeleteStatusTemplateInput { rowId: UUID! } -"""The output of our delete \`Vote\` mutation.""" -type DeleteVotePayload { +"""The output of our delete \`StatusTemplate\` mutation.""" +type DeleteStatusTemplatePayload { """ 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 \`Vote\` that was deleted by this mutation.""" - vote: Vote + """The \`StatusTemplate\` that was deleted by this mutation.""" + statusTemplate: StatusTemplate """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our \`Vote\`. May be used by Relay 1.""" - voteEdge( - """The method to use when ordering \`Vote\`.""" - orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] - ): VoteEdge + """An edge for our \`StatusTemplate\`. May be used by Relay 1.""" + statusTemplateEdge( + """The method to use when ordering \`StatusTemplate\`.""" + orderBy: [StatusTemplateOrderBy!]! = [PRIMARY_KEY_ASC] + ): StatusTemplateEdge } -"""All input for the \`deleteVote\` mutation.""" -input DeleteVoteInput { +"""All input for the \`deleteStatusTemplate\` mutation.""" +input DeleteStatusTemplateInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -16004,39 +16043,6 @@ input DeleteProjectStatusConfigInput { rowId: UUID! } -"""The output of our delete \`SignalCluster\` mutation.""" -type DeleteSignalClusterPayload { - """ - 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 \`SignalCluster\` that was deleted by this mutation.""" - signalCluster: SignalCluster - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our \`SignalCluster\`. May be used by Relay 1.""" - signalClusterEdge( - """The method to use when ordering \`SignalCluster\`.""" - orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] - ): SignalClusterEdge -} - -"""All input for the \`deleteSignalCluster\` mutation.""" -input DeleteSignalClusterInput { - """ - 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 \`Attachment\` mutation.""" type DeleteAttachmentPayload { """ @@ -16093,8 +16099,41 @@ type DeleteWardenSyncQueuePayload { ): WardenSyncQueueEdge } -"""All input for the \`deleteWardenSyncQueue\` mutation.""" -input DeleteWardenSyncQueueInput { +"""All input for the \`deleteWardenSyncQueue\` mutation.""" +input DeleteWardenSyncQueueInput { + """ + 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 \`SignalCluster\` mutation.""" +type DeleteSignalClusterPayload { + """ + 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 \`SignalCluster\` that was deleted by this mutation.""" + signalCluster: SignalCluster + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our \`SignalCluster\`. May be used by Relay 1.""" + signalClusterEdge( + """The method to use when ordering \`SignalCluster\`.""" + orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] + ): SignalClusterEdge +} + +"""All input for the \`deleteSignalCluster\` mutation.""" +input DeleteSignalClusterInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -16224,6 +16263,12 @@ type Query implements Node { """Get a single \`User\`.""" userByUsername(username: String!): User + """Get a single \`Vote\`.""" + vote(rowId: UUID!): Vote + + """Get a single \`Vote\`.""" + voteByPostIdAndUserId(postId: UUID!, userId: UUID!): Vote + """Get a single \`ProjectLink\`.""" projectLink(rowId: UUID!): ProjectLink @@ -16233,27 +16278,21 @@ type Query implements Node { """Get a single \`StatusTemplate\`.""" statusTemplateByOrganizationIdAndName(organizationId: UUID!, name: String!): StatusTemplate - """Get a single \`Vote\`.""" - vote(rowId: UUID!): Vote - - """Get a single \`Vote\`.""" - voteByPostIdAndUserId(postId: UUID!, userId: UUID!): Vote - """Get a single \`ProjectStatusConfig\`.""" projectStatusConfig(rowId: UUID!): ProjectStatusConfig """Get a single \`ProjectStatusConfig\`.""" projectStatusConfigByProjectIdAndStatusTemplateId(projectId: UUID!, statusTemplateId: UUID!): ProjectStatusConfig - """Get a single \`SignalCluster\`.""" - signalCluster(rowId: UUID!): SignalCluster - """Get a single \`Attachment\`.""" attachment(rowId: UUID!): Attachment """Get a single \`WardenSyncQueue\`.""" wardenSyncQueue(rowId: UUID!): WardenSyncQueue + """Get a single \`SignalCluster\`.""" + signalCluster(rowId: UUID!): SignalCluster + """Get a single \`Project\`.""" project(rowId: UUID!): Project @@ -16408,8 +16447,8 @@ type Query implements Node { orderBy: [UserOrderBy!] = [PRIMARY_KEY_ASC] ): UserConnection - """Reads and enables pagination through a set of \`ProjectLink\`.""" - projectLinks( + """Reads and enables pagination through a set of \`Vote\`.""" + votes( """Only read the first \`n\` values of the set.""" first: Int @@ -16431,19 +16470,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: ProjectLinkCondition + condition: VoteCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: ProjectLinkFilter + filter: VoteFilter - """The method to use when ordering \`ProjectLink\`.""" - orderBy: [ProjectLinkOrderBy!] = [PRIMARY_KEY_ASC] - ): ProjectLinkConnection + """The method to use when ordering \`Vote\`.""" + orderBy: [VoteOrderBy!] = [PRIMARY_KEY_ASC] + ): VoteConnection - """Reads and enables pagination through a set of \`StatusTemplate\`.""" - statusTemplates( + """Reads and enables pagination through a set of \`ProjectLink\`.""" + projectLinks( """Only read the first \`n\` values of the set.""" first: Int @@ -16465,19 +16504,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: StatusTemplateCondition + condition: ProjectLinkCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: StatusTemplateFilter + filter: ProjectLinkFilter - """The method to use when ordering \`StatusTemplate\`.""" - orderBy: [StatusTemplateOrderBy!] = [PRIMARY_KEY_ASC] - ): StatusTemplateConnection + """The method to use when ordering \`ProjectLink\`.""" + orderBy: [ProjectLinkOrderBy!] = [PRIMARY_KEY_ASC] + ): ProjectLinkConnection - """Reads and enables pagination through a set of \`Vote\`.""" - votes( + """Reads and enables pagination through a set of \`StatusTemplate\`.""" + statusTemplates( """Only read the first \`n\` values of the set.""" first: Int @@ -16499,16 +16538,16 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: VoteCondition + condition: StatusTemplateCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: VoteFilter + filter: StatusTemplateFilter - """The method to use when ordering \`Vote\`.""" - orderBy: [VoteOrderBy!] = [PRIMARY_KEY_ASC] - ): VoteConnection + """The method to use when ordering \`StatusTemplate\`.""" + orderBy: [StatusTemplateOrderBy!] = [PRIMARY_KEY_ASC] + ): StatusTemplateConnection """Reads and enables pagination through a set of \`ProjectStatusConfig\`.""" projectStatusConfigs( @@ -16544,8 +16583,8 @@ type Query implements Node { orderBy: [ProjectStatusConfigOrderBy!] = [PRIMARY_KEY_ASC] ): ProjectStatusConfigConnection - """Reads and enables pagination through a set of \`SignalCluster\`.""" - signalClusters( + """Reads and enables pagination through a set of \`Attachment\`.""" + attachments( """Only read the first \`n\` values of the set.""" first: Int @@ -16567,19 +16606,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: SignalClusterCondition + condition: AttachmentCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: SignalClusterFilter + filter: AttachmentFilter - """The method to use when ordering \`SignalCluster\`.""" - orderBy: [SignalClusterOrderBy!] = [PRIMARY_KEY_ASC] - ): SignalClusterConnection + """The method to use when ordering \`Attachment\`.""" + orderBy: [AttachmentOrderBy!] = [PRIMARY_KEY_ASC] + ): AttachmentConnection - """Reads and enables pagination through a set of \`Attachment\`.""" - attachments( + """Reads and enables pagination through a set of \`WardenSyncQueue\`.""" + wardenSyncQueues( """Only read the first \`n\` values of the set.""" first: Int @@ -16601,19 +16640,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: AttachmentCondition + condition: WardenSyncQueueCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: AttachmentFilter + filter: WardenSyncQueueFilter - """The method to use when ordering \`Attachment\`.""" - orderBy: [AttachmentOrderBy!] = [PRIMARY_KEY_ASC] - ): AttachmentConnection + """The method to use when ordering \`WardenSyncQueue\`.""" + orderBy: [WardenSyncQueueOrderBy!] = [PRIMARY_KEY_ASC] + ): WardenSyncQueueConnection - """Reads and enables pagination through a set of \`WardenSyncQueue\`.""" - wardenSyncQueues( + """Reads and enables pagination through a set of \`SignalCluster\`.""" + signalClusters( """Only read the first \`n\` values of the set.""" first: Int @@ -16635,16 +16674,16 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: WardenSyncQueueCondition + condition: SignalClusterCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: WardenSyncQueueFilter + filter: SignalClusterFilter - """The method to use when ordering \`WardenSyncQueue\`.""" - orderBy: [WardenSyncQueueOrderBy!] = [PRIMARY_KEY_ASC] - ): WardenSyncQueueConnection + """The method to use when ordering \`SignalCluster\`.""" + orderBy: [SignalClusterOrderBy!] = [PRIMARY_KEY_ASC] + ): SignalClusterConnection """Reads and enables pagination through a set of \`Project\`.""" projects( @@ -16796,6 +16835,14 @@ type Mutation { input: CreateUserInput! ): CreateUserPayload + """Creates a single \`Vote\`.""" + createVote( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateVoteInput! + ): CreateVotePayload + """Creates a single \`ProjectLink\`.""" createProjectLink( """ @@ -16812,14 +16859,6 @@ type Mutation { input: CreateStatusTemplateInput! ): CreateStatusTemplatePayload - """Creates a single \`Vote\`.""" - createVote( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateVoteInput! - ): CreateVotePayload - """Creates a single \`ProjectStatusConfig\`.""" createProjectStatusConfig( """ @@ -16828,14 +16867,6 @@ type Mutation { input: CreateProjectStatusConfigInput! ): CreateProjectStatusConfigPayload - """Creates a single \`SignalCluster\`.""" - createSignalCluster( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateSignalClusterInput! - ): CreateSignalClusterPayload - """Creates a single \`Attachment\`.""" createAttachment( """ @@ -16852,6 +16883,14 @@ type Mutation { input: CreateWardenSyncQueueInput! ): CreateWardenSyncQueuePayload + """Creates a single \`SignalCluster\`.""" + createSignalCluster( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateSignalClusterInput! + ): CreateSignalClusterPayload + """Creates a single \`Project\`.""" createProject( """ @@ -16900,6 +16939,14 @@ type Mutation { input: UpdateUserInput! ): UpdateUserPayload + """Updates a single \`Vote\` using a unique key and a patch.""" + updateVote( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateVoteInput! + ): UpdateVotePayload + """Updates a single \`ProjectLink\` using a unique key and a patch.""" updateProjectLink( """ @@ -16916,14 +16963,6 @@ type Mutation { input: UpdateStatusTemplateInput! ): UpdateStatusTemplatePayload - """Updates a single \`Vote\` using a unique key and a patch.""" - updateVote( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateVoteInput! - ): UpdateVotePayload - """Updates a single \`ProjectStatusConfig\` using a unique key and a patch.""" updateProjectStatusConfig( """ @@ -16932,14 +16971,6 @@ type Mutation { input: UpdateProjectStatusConfigInput! ): UpdateProjectStatusConfigPayload - """Updates a single \`SignalCluster\` using a unique key and a patch.""" - updateSignalCluster( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateSignalClusterInput! - ): UpdateSignalClusterPayload - """Updates a single \`Attachment\` using a unique key and a patch.""" updateAttachment( """ @@ -16956,6 +16987,14 @@ type Mutation { input: UpdateWardenSyncQueueInput! ): UpdateWardenSyncQueuePayload + """Updates a single \`SignalCluster\` using a unique key and a patch.""" + updateSignalCluster( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateSignalClusterInput! + ): UpdateSignalClusterPayload + """Updates a single \`Project\` using a unique key and a patch.""" updateProject( """ @@ -17004,6 +17043,14 @@ type Mutation { input: DeleteUserInput! ): DeleteUserPayload + """Deletes a single \`Vote\` using a unique key.""" + deleteVote( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteVoteInput! + ): DeleteVotePayload + """Deletes a single \`ProjectLink\` using a unique key.""" deleteProjectLink( """ @@ -17020,14 +17067,6 @@ type Mutation { input: DeleteStatusTemplateInput! ): DeleteStatusTemplatePayload - """Deletes a single \`Vote\` using a unique key.""" - deleteVote( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteVoteInput! - ): DeleteVotePayload - """Deletes a single \`ProjectStatusConfig\` using a unique key.""" deleteProjectStatusConfig( """ @@ -17036,14 +17075,6 @@ type Mutation { input: DeleteProjectStatusConfigInput! ): DeleteProjectStatusConfigPayload - """Deletes a single \`SignalCluster\` using a unique key.""" - deleteSignalCluster( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteSignalClusterInput! - ): DeleteSignalClusterPayload - """Deletes a single \`Attachment\` using a unique key.""" deleteAttachment( """ @@ -17060,6 +17091,14 @@ type Mutation { input: DeleteWardenSyncQueueInput! ): DeleteWardenSyncQueuePayload + """Deletes a single \`SignalCluster\` using a unique key.""" + deleteSignalCluster( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteSignalClusterInput! + ): DeleteSignalClusterPayload + """Deletes a single \`Project\` using a unique key.""" deleteProject( """ @@ -17685,17 +17724,17 @@ ${String(oldPlan14)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan6.apply(this, args); + $prev = oldPlan7.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.createProjectLink, but that function did not return a step! -${String(oldPlan6)}`); +${String(oldPlan7)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper7(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper8(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; @@ -17743,17 +17782,17 @@ ${String(oldPlan11)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan8.apply(this, args); + $prev = oldPlan9.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.createStatusTemplate, but that function did not return a step! -${String(oldPlan8)}`); +${String(oldPlan9)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper9(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper10(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; @@ -17812,17 +17851,17 @@ ${String(oldPlan5)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan10.apply(this, args); + $prev = oldPlan6.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.createVote, but that function did not return a step! -${String(oldPlan10)}`); +${String(oldPlan6)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper10(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper6(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; @@ -17962,17 +18001,17 @@ ${String(oldPlan57)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan48.apply(this, args); + $prev = oldPlan50.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.deleteProjectLink, but that function did not return a step! -${String(oldPlan48)}`); +${String(oldPlan50)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper49(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper51(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; @@ -18022,17 +18061,17 @@ ${String(oldPlan54)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan50.apply(this, args); + $prev = oldPlan52.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.deleteStatusTemplate, but that function did not return a step! -${String(oldPlan50)}`); +${String(oldPlan52)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper51(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper53(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; @@ -18091,17 +18130,17 @@ ${String(oldPlan47)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan52.apply(this, args); + $prev = oldPlan48.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.deleteVote, but that function did not return a step! -${String(oldPlan52)}`); +${String(oldPlan48)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper53(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper49(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; @@ -18288,17 +18327,17 @@ ${String(oldPlan36)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan27.apply(this, args); + $prev = oldPlan29.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.updateProjectLink, but that function did not return a step! -${String(oldPlan27)}`); +${String(oldPlan29)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper28(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper30(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; @@ -18348,17 +18387,17 @@ ${String(oldPlan33)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan29.apply(this, args); + $prev = oldPlan31.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.updateStatusTemplate, but that function did not return a step! -${String(oldPlan29)}`); +${String(oldPlan31)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper30(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper32(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; @@ -18417,17 +18456,17 @@ ${String(oldPlan26)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan31.apply(this, args); + $prev = oldPlan27.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.updateVote, but that function did not return a step! -${String(oldPlan31)}`); +${String(oldPlan27)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper32(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper28(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; diff --git a/src/generated/graphql/schema.graphql b/src/generated/graphql/schema.graphql index c704f3a..4c89893 100644 --- a/src/generated/graphql/schema.graphql +++ b/src/generated/graphql/schema.graphql @@ -43,7 +43,7 @@ type Post { statusUpdatedAt: Datetime! createdAt: Datetime! updatedAt: Datetime! - number: Int! + number: Int source: String sentiment: String aiTags: JSON @@ -8127,6 +8127,51 @@ input UserInput { avatarUrl: String } +"""The output of our create `Vote` mutation.""" +type CreateVotePayload { + """ + 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 `Vote` that was created by this mutation.""" + vote: Vote + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `Vote`. May be used by Relay 1.""" + voteEdge( + """The method to use when ordering `Vote`.""" + orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] + ): VoteEdge +} + +"""All input for the create `Vote` mutation.""" +input CreateVoteInput { + """ + 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 `Vote` to be created by this mutation.""" + vote: VoteInput! +} + +"""An input for mutations affecting `Vote`""" +input VoteInput { + rowId: UUID + postId: UUID! + userId: UUID! + voteType: VoteType! + createdAt: Datetime + updatedAt: Datetime +} + """The output of our create `ProjectLink` mutation.""" type CreateProjectLinkPayload { """ @@ -8221,51 +8266,6 @@ input StatusTemplateInput { updatedAt: Datetime } -"""The output of our create `Vote` mutation.""" -type CreateVotePayload { - """ - 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 `Vote` that was created by this mutation.""" - vote: Vote - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `Vote`. May be used by Relay 1.""" - voteEdge( - """The method to use when ordering `Vote`.""" - orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] - ): VoteEdge -} - -"""All input for the create `Vote` mutation.""" -input CreateVoteInput { - """ - 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 `Vote` to be created by this mutation.""" - vote: VoteInput! -} - -"""An input for mutations affecting `Vote`""" -input VoteInput { - rowId: UUID - postId: UUID! - userId: UUID! - voteType: VoteType! - createdAt: Datetime - updatedAt: Datetime -} - """The output of our create `ProjectStatusConfig` mutation.""" type CreateProjectStatusConfigPayload { """ @@ -8314,52 +8314,6 @@ input ProjectStatusConfigInput { createdAt: Datetime } -"""The output of our create `SignalCluster` mutation.""" -type CreateSignalClusterPayload { - """ - 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 `SignalCluster` that was created by this mutation.""" - signalCluster: SignalCluster - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `SignalCluster`. May be used by Relay 1.""" - signalClusterEdge( - """The method to use when ordering `SignalCluster`.""" - orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] - ): SignalClusterEdge -} - -"""All input for the create `SignalCluster` mutation.""" -input CreateSignalClusterInput { - """ - 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 `SignalCluster` to be created by this mutation.""" - signalCluster: SignalClusterInput! -} - -"""An input for mutations affecting `SignalCluster`""" -input SignalClusterInput { - rowId: UUID - projectId: UUID! - label: String - summary: String - memberCount: Int - createdAt: Datetime - updatedAt: Datetime -} - """The output of our create `Attachment` mutation.""" type CreateAttachmentPayload { """ @@ -8457,6 +8411,52 @@ input WardenSyncQueueInput { createdAt: Datetime } +"""The output of our create `SignalCluster` mutation.""" +type CreateSignalClusterPayload { + """ + 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 `SignalCluster` that was created by this mutation.""" + signalCluster: SignalCluster + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `SignalCluster`. May be used by Relay 1.""" + signalClusterEdge( + """The method to use when ordering `SignalCluster`.""" + orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] + ): SignalClusterEdge +} + +"""All input for the create `SignalCluster` mutation.""" +input CreateSignalClusterInput { + """ + 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 `SignalCluster` to be created by this mutation.""" + signalCluster: SignalClusterInput! +} + +"""An input for mutations affecting `SignalCluster`""" +input SignalClusterInput { + rowId: UUID + projectId: UUID! + label: String + summary: String + memberCount: Int + createdAt: Datetime + updatedAt: Datetime +} + """The output of our create `Project` mutation.""" type CreateProjectPayload { """ @@ -8758,6 +8758,54 @@ input UserPatch { avatarUrl: String } +"""The output of our update `Vote` mutation.""" +type UpdateVotePayload { + """ + 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 `Vote` that was updated by this mutation.""" + vote: Vote + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `Vote`. May be used by Relay 1.""" + voteEdge( + """The method to use when ordering `Vote`.""" + orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] + ): VoteEdge +} + +"""All input for the `updateVote` mutation.""" +input UpdateVoteInput { + """ + 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 `Vote` being updated. + """ + patch: VotePatch! +} + +"""Represents an update to a `Vote`. Fields that are set will be updated.""" +input VotePatch { + rowId: UUID + postId: UUID + userId: UUID + voteType: VoteType + createdAt: Datetime + updatedAt: Datetime +} + """The output of our update `ProjectLink` mutation.""" type UpdateProjectLinkPayload { """ @@ -8862,31 +8910,31 @@ input StatusTemplatePatch { updatedAt: Datetime } -"""The output of our update `Vote` mutation.""" -type UpdateVotePayload { +"""The output of our update `ProjectStatusConfig` mutation.""" +type UpdateProjectStatusConfigPayload { """ 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 `Vote` that was updated by this mutation.""" - vote: Vote + """The `ProjectStatusConfig` that was updated by this mutation.""" + projectStatusConfig: ProjectStatusConfig """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `Vote`. May be used by Relay 1.""" - voteEdge( - """The method to use when ordering `Vote`.""" - orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] - ): VoteEdge + """An edge for our `ProjectStatusConfig`. May be used by Relay 1.""" + projectStatusConfigEdge( + """The method to use when ordering `ProjectStatusConfig`.""" + orderBy: [ProjectStatusConfigOrderBy!]! = [PRIMARY_KEY_ASC] + ): ProjectStatusConfigEdge } -"""All input for the `updateVote` mutation.""" -input UpdateVoteInput { +"""All input for the `updateProjectStatusConfig` mutation.""" +input UpdateProjectStatusConfigInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -8895,55 +8943,7 @@ input UpdateVoteInput { rowId: UUID! """ - An object where the defined keys will be set on the `Vote` being updated. - """ - patch: VotePatch! -} - -"""Represents an update to a `Vote`. Fields that are set will be updated.""" -input VotePatch { - rowId: UUID - postId: UUID - userId: UUID - voteType: VoteType - createdAt: Datetime - updatedAt: Datetime -} - -"""The output of our update `ProjectStatusConfig` mutation.""" -type UpdateProjectStatusConfigPayload { - """ - 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 `ProjectStatusConfig` that was updated by this mutation.""" - projectStatusConfig: ProjectStatusConfig - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `ProjectStatusConfig`. May be used by Relay 1.""" - projectStatusConfigEdge( - """The method to use when ordering `ProjectStatusConfig`.""" - orderBy: [ProjectStatusConfigOrderBy!]! = [PRIMARY_KEY_ASC] - ): ProjectStatusConfigEdge -} - -"""All input for the `updateProjectStatusConfig` mutation.""" -input UpdateProjectStatusConfigInput { - """ - 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 `ProjectStatusConfig` being updated. + An object where the defined keys will be set on the `ProjectStatusConfig` being updated. """ patch: ProjectStatusConfigPatch! } @@ -8963,57 +8963,6 @@ input ProjectStatusConfigPatch { createdAt: Datetime } -"""The output of our update `SignalCluster` mutation.""" -type UpdateSignalClusterPayload { - """ - 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 `SignalCluster` that was updated by this mutation.""" - signalCluster: SignalCluster - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `SignalCluster`. May be used by Relay 1.""" - signalClusterEdge( - """The method to use when ordering `SignalCluster`.""" - orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] - ): SignalClusterEdge -} - -"""All input for the `updateSignalCluster` mutation.""" -input UpdateSignalClusterInput { - """ - 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 `SignalCluster` being updated. - """ - patch: SignalClusterPatch! -} - -""" -Represents an update to a `SignalCluster`. Fields that are set will be updated. -""" -input SignalClusterPatch { - rowId: UUID - projectId: UUID - label: String - summary: String - memberCount: Int - createdAt: Datetime - updatedAt: Datetime -} - """The output of our update `Attachment` mutation.""" type UpdateAttachmentPayload { """ @@ -9121,6 +9070,57 @@ input WardenSyncQueuePatch { createdAt: Datetime } +"""The output of our update `SignalCluster` mutation.""" +type UpdateSignalClusterPayload { + """ + 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 `SignalCluster` that was updated by this mutation.""" + signalCluster: SignalCluster + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `SignalCluster`. May be used by Relay 1.""" + signalClusterEdge( + """The method to use when ordering `SignalCluster`.""" + orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] + ): SignalClusterEdge +} + +"""All input for the `updateSignalCluster` mutation.""" +input UpdateSignalClusterInput { + """ + 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 `SignalCluster` being updated. + """ + patch: SignalClusterPatch! +} + +""" +Represents an update to a `SignalCluster`. Fields that are set will be updated. +""" +input SignalClusterPatch { + rowId: UUID + projectId: UUID + label: String + summary: String + memberCount: Int + createdAt: Datetime + updatedAt: Datetime +} + """The output of our update `Project` mutation.""" type UpdateProjectPayload { """ @@ -9365,31 +9365,31 @@ input DeleteUserInput { rowId: UUID! } -"""The output of our delete `ProjectLink` mutation.""" -type DeleteProjectLinkPayload { +"""The output of our delete `Vote` mutation.""" +type DeleteVotePayload { """ 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 `ProjectLink` that was deleted by this mutation.""" - projectLink: ProjectLink + """The `Vote` that was deleted by this mutation.""" + vote: Vote """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `ProjectLink`. May be used by Relay 1.""" - projectLinkEdge( - """The method to use when ordering `ProjectLink`.""" - orderBy: [ProjectLinkOrderBy!]! = [PRIMARY_KEY_ASC] - ): ProjectLinkEdge + """An edge for our `Vote`. May be used by Relay 1.""" + voteEdge( + """The method to use when ordering `Vote`.""" + orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] + ): VoteEdge } -"""All input for the `deleteProjectLink` mutation.""" -input DeleteProjectLinkInput { +"""All input for the `deleteVote` mutation.""" +input DeleteVoteInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -9398,31 +9398,31 @@ input DeleteProjectLinkInput { rowId: UUID! } -"""The output of our delete `StatusTemplate` mutation.""" -type DeleteStatusTemplatePayload { +"""The output of our delete `ProjectLink` mutation.""" +type DeleteProjectLinkPayload { """ 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 `StatusTemplate` that was deleted by this mutation.""" - statusTemplate: StatusTemplate + """The `ProjectLink` that was deleted by this mutation.""" + projectLink: ProjectLink """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `StatusTemplate`. May be used by Relay 1.""" - statusTemplateEdge( - """The method to use when ordering `StatusTemplate`.""" - orderBy: [StatusTemplateOrderBy!]! = [PRIMARY_KEY_ASC] - ): StatusTemplateEdge + """An edge for our `ProjectLink`. May be used by Relay 1.""" + projectLinkEdge( + """The method to use when ordering `ProjectLink`.""" + orderBy: [ProjectLinkOrderBy!]! = [PRIMARY_KEY_ASC] + ): ProjectLinkEdge } -"""All input for the `deleteStatusTemplate` mutation.""" -input DeleteStatusTemplateInput { +"""All input for the `deleteProjectLink` mutation.""" +input DeleteProjectLinkInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -9431,31 +9431,31 @@ input DeleteStatusTemplateInput { rowId: UUID! } -"""The output of our delete `Vote` mutation.""" -type DeleteVotePayload { +"""The output of our delete `StatusTemplate` mutation.""" +type DeleteStatusTemplatePayload { """ 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 `Vote` that was deleted by this mutation.""" - vote: Vote + """The `StatusTemplate` that was deleted by this mutation.""" + statusTemplate: StatusTemplate """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `Vote`. May be used by Relay 1.""" - voteEdge( - """The method to use when ordering `Vote`.""" - orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] - ): VoteEdge + """An edge for our `StatusTemplate`. May be used by Relay 1.""" + statusTemplateEdge( + """The method to use when ordering `StatusTemplate`.""" + orderBy: [StatusTemplateOrderBy!]! = [PRIMARY_KEY_ASC] + ): StatusTemplateEdge } -"""All input for the `deleteVote` mutation.""" -input DeleteVoteInput { +"""All input for the `deleteStatusTemplate` mutation.""" +input DeleteStatusTemplateInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -9497,39 +9497,6 @@ input DeleteProjectStatusConfigInput { rowId: UUID! } -"""The output of our delete `SignalCluster` mutation.""" -type DeleteSignalClusterPayload { - """ - 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 `SignalCluster` that was deleted by this mutation.""" - signalCluster: SignalCluster - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `SignalCluster`. May be used by Relay 1.""" - signalClusterEdge( - """The method to use when ordering `SignalCluster`.""" - orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] - ): SignalClusterEdge -} - -"""All input for the `deleteSignalCluster` mutation.""" -input DeleteSignalClusterInput { - """ - 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 `Attachment` mutation.""" type DeleteAttachmentPayload { """ @@ -9596,6 +9563,39 @@ input DeleteWardenSyncQueueInput { rowId: UUID! } +"""The output of our delete `SignalCluster` mutation.""" +type DeleteSignalClusterPayload { + """ + 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 `SignalCluster` that was deleted by this mutation.""" + signalCluster: SignalCluster + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `SignalCluster`. May be used by Relay 1.""" + signalClusterEdge( + """The method to use when ordering `SignalCluster`.""" + orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] + ): SignalClusterEdge +} + +"""All input for the `deleteSignalCluster` mutation.""" +input DeleteSignalClusterInput { + """ + 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 `Project` mutation.""" type DeleteProjectPayload { """ @@ -9717,6 +9717,12 @@ type Query implements Node { """Get a single `User`.""" userByUsername(username: String!): User + """Get a single `Vote`.""" + vote(rowId: UUID!): Vote + + """Get a single `Vote`.""" + voteByPostIdAndUserId(postId: UUID!, userId: UUID!): Vote + """Get a single `ProjectLink`.""" projectLink(rowId: UUID!): ProjectLink @@ -9726,27 +9732,21 @@ type Query implements Node { """Get a single `StatusTemplate`.""" statusTemplateByOrganizationIdAndName(organizationId: UUID!, name: String!): StatusTemplate - """Get a single `Vote`.""" - vote(rowId: UUID!): Vote - - """Get a single `Vote`.""" - voteByPostIdAndUserId(postId: UUID!, userId: UUID!): Vote - """Get a single `ProjectStatusConfig`.""" projectStatusConfig(rowId: UUID!): ProjectStatusConfig """Get a single `ProjectStatusConfig`.""" projectStatusConfigByProjectIdAndStatusTemplateId(projectId: UUID!, statusTemplateId: UUID!): ProjectStatusConfig - """Get a single `SignalCluster`.""" - signalCluster(rowId: UUID!): SignalCluster - """Get a single `Attachment`.""" attachment(rowId: UUID!): Attachment """Get a single `WardenSyncQueue`.""" wardenSyncQueue(rowId: UUID!): WardenSyncQueue + """Get a single `SignalCluster`.""" + signalCluster(rowId: UUID!): SignalCluster + """Get a single `Project`.""" project(rowId: UUID!): Project @@ -9901,8 +9901,8 @@ type Query implements Node { orderBy: [UserOrderBy!] = [PRIMARY_KEY_ASC] ): UserConnection - """Reads and enables pagination through a set of `ProjectLink`.""" - projectLinks( + """Reads and enables pagination through a set of `Vote`.""" + votes( """Only read the first `n` values of the set.""" first: Int @@ -9924,19 +9924,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: ProjectLinkCondition + condition: VoteCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: ProjectLinkFilter + filter: VoteFilter - """The method to use when ordering `ProjectLink`.""" - orderBy: [ProjectLinkOrderBy!] = [PRIMARY_KEY_ASC] - ): ProjectLinkConnection + """The method to use when ordering `Vote`.""" + orderBy: [VoteOrderBy!] = [PRIMARY_KEY_ASC] + ): VoteConnection - """Reads and enables pagination through a set of `StatusTemplate`.""" - statusTemplates( + """Reads and enables pagination through a set of `ProjectLink`.""" + projectLinks( """Only read the first `n` values of the set.""" first: Int @@ -9958,19 +9958,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: StatusTemplateCondition + condition: ProjectLinkCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: StatusTemplateFilter + filter: ProjectLinkFilter - """The method to use when ordering `StatusTemplate`.""" - orderBy: [StatusTemplateOrderBy!] = [PRIMARY_KEY_ASC] - ): StatusTemplateConnection + """The method to use when ordering `ProjectLink`.""" + orderBy: [ProjectLinkOrderBy!] = [PRIMARY_KEY_ASC] + ): ProjectLinkConnection - """Reads and enables pagination through a set of `Vote`.""" - votes( + """Reads and enables pagination through a set of `StatusTemplate`.""" + statusTemplates( """Only read the first `n` values of the set.""" first: Int @@ -9992,16 +9992,16 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: VoteCondition + condition: StatusTemplateCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: VoteFilter + filter: StatusTemplateFilter - """The method to use when ordering `Vote`.""" - orderBy: [VoteOrderBy!] = [PRIMARY_KEY_ASC] - ): VoteConnection + """The method to use when ordering `StatusTemplate`.""" + orderBy: [StatusTemplateOrderBy!] = [PRIMARY_KEY_ASC] + ): StatusTemplateConnection """Reads and enables pagination through a set of `ProjectStatusConfig`.""" projectStatusConfigs( @@ -10037,8 +10037,8 @@ type Query implements Node { orderBy: [ProjectStatusConfigOrderBy!] = [PRIMARY_KEY_ASC] ): ProjectStatusConfigConnection - """Reads and enables pagination through a set of `SignalCluster`.""" - signalClusters( + """Reads and enables pagination through a set of `Attachment`.""" + attachments( """Only read the first `n` values of the set.""" first: Int @@ -10060,19 +10060,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: SignalClusterCondition + condition: AttachmentCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: SignalClusterFilter + filter: AttachmentFilter - """The method to use when ordering `SignalCluster`.""" - orderBy: [SignalClusterOrderBy!] = [PRIMARY_KEY_ASC] - ): SignalClusterConnection + """The method to use when ordering `Attachment`.""" + orderBy: [AttachmentOrderBy!] = [PRIMARY_KEY_ASC] + ): AttachmentConnection - """Reads and enables pagination through a set of `Attachment`.""" - attachments( + """Reads and enables pagination through a set of `WardenSyncQueue`.""" + wardenSyncQueues( """Only read the first `n` values of the set.""" first: Int @@ -10094,19 +10094,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: AttachmentCondition + condition: WardenSyncQueueCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: AttachmentFilter + filter: WardenSyncQueueFilter - """The method to use when ordering `Attachment`.""" - orderBy: [AttachmentOrderBy!] = [PRIMARY_KEY_ASC] - ): AttachmentConnection + """The method to use when ordering `WardenSyncQueue`.""" + orderBy: [WardenSyncQueueOrderBy!] = [PRIMARY_KEY_ASC] + ): WardenSyncQueueConnection - """Reads and enables pagination through a set of `WardenSyncQueue`.""" - wardenSyncQueues( + """Reads and enables pagination through a set of `SignalCluster`.""" + signalClusters( """Only read the first `n` values of the set.""" first: Int @@ -10128,16 +10128,16 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: WardenSyncQueueCondition + condition: SignalClusterCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: WardenSyncQueueFilter + filter: SignalClusterFilter - """The method to use when ordering `WardenSyncQueue`.""" - orderBy: [WardenSyncQueueOrderBy!] = [PRIMARY_KEY_ASC] - ): WardenSyncQueueConnection + """The method to use when ordering `SignalCluster`.""" + orderBy: [SignalClusterOrderBy!] = [PRIMARY_KEY_ASC] + ): SignalClusterConnection """Reads and enables pagination through a set of `Project`.""" projects( @@ -10289,6 +10289,14 @@ type Mutation { input: CreateUserInput! ): CreateUserPayload + """Creates a single `Vote`.""" + createVote( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateVoteInput! + ): CreateVotePayload + """Creates a single `ProjectLink`.""" createProjectLink( """ @@ -10305,14 +10313,6 @@ type Mutation { input: CreateStatusTemplateInput! ): CreateStatusTemplatePayload - """Creates a single `Vote`.""" - createVote( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateVoteInput! - ): CreateVotePayload - """Creates a single `ProjectStatusConfig`.""" createProjectStatusConfig( """ @@ -10321,14 +10321,6 @@ type Mutation { input: CreateProjectStatusConfigInput! ): CreateProjectStatusConfigPayload - """Creates a single `SignalCluster`.""" - createSignalCluster( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateSignalClusterInput! - ): CreateSignalClusterPayload - """Creates a single `Attachment`.""" createAttachment( """ @@ -10345,6 +10337,14 @@ type Mutation { input: CreateWardenSyncQueueInput! ): CreateWardenSyncQueuePayload + """Creates a single `SignalCluster`.""" + createSignalCluster( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateSignalClusterInput! + ): CreateSignalClusterPayload + """Creates a single `Project`.""" createProject( """ @@ -10393,6 +10393,14 @@ type Mutation { input: UpdateUserInput! ): UpdateUserPayload + """Updates a single `Vote` using a unique key and a patch.""" + updateVote( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateVoteInput! + ): UpdateVotePayload + """Updates a single `ProjectLink` using a unique key and a patch.""" updateProjectLink( """ @@ -10409,14 +10417,6 @@ type Mutation { input: UpdateStatusTemplateInput! ): UpdateStatusTemplatePayload - """Updates a single `Vote` using a unique key and a patch.""" - updateVote( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateVoteInput! - ): UpdateVotePayload - """Updates a single `ProjectStatusConfig` using a unique key and a patch.""" updateProjectStatusConfig( """ @@ -10425,14 +10425,6 @@ type Mutation { input: UpdateProjectStatusConfigInput! ): UpdateProjectStatusConfigPayload - """Updates a single `SignalCluster` using a unique key and a patch.""" - updateSignalCluster( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateSignalClusterInput! - ): UpdateSignalClusterPayload - """Updates a single `Attachment` using a unique key and a patch.""" updateAttachment( """ @@ -10449,6 +10441,14 @@ type Mutation { input: UpdateWardenSyncQueueInput! ): UpdateWardenSyncQueuePayload + """Updates a single `SignalCluster` using a unique key and a patch.""" + updateSignalCluster( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateSignalClusterInput! + ): UpdateSignalClusterPayload + """Updates a single `Project` using a unique key and a patch.""" updateProject( """ @@ -10497,6 +10497,14 @@ type Mutation { input: DeleteUserInput! ): DeleteUserPayload + """Deletes a single `Vote` using a unique key.""" + deleteVote( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteVoteInput! + ): DeleteVotePayload + """Deletes a single `ProjectLink` using a unique key.""" deleteProjectLink( """ @@ -10513,14 +10521,6 @@ type Mutation { input: DeleteStatusTemplateInput! ): DeleteStatusTemplatePayload - """Deletes a single `Vote` using a unique key.""" - deleteVote( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteVoteInput! - ): DeleteVotePayload - """Deletes a single `ProjectStatusConfig` using a unique key.""" deleteProjectStatusConfig( """ @@ -10529,14 +10529,6 @@ type Mutation { input: DeleteProjectStatusConfigInput! ): DeleteProjectStatusConfigPayload - """Deletes a single `SignalCluster` using a unique key.""" - deleteSignalCluster( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteSignalClusterInput! - ): DeleteSignalClusterPayload - """Deletes a single `Attachment` using a unique key.""" deleteAttachment( """ @@ -10553,6 +10545,14 @@ type Mutation { input: DeleteWardenSyncQueueInput! ): DeleteWardenSyncQueuePayload + """Deletes a single `SignalCluster` using a unique key.""" + deleteSignalCluster( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteSignalClusterInput! + ): DeleteSignalClusterPayload + """Deletes a single `Project` using a unique key.""" deleteProject( """