Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions codegen-main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CodegenConfig } from "@graphql-codegen/cli";
import { type CodegenConfig } from "@graphql-codegen/cli";

const config: CodegenConfig = {
schema: "./schema-main.graphql",
Expand All @@ -25,7 +25,19 @@ const config: CodegenConfig = {
plugins: ["typescript-apollo-client-helpers"],
},
"./src/graphql/types.generated.ts": {
plugins: ["typescript", "typescript-operations"],
plugins: [
{
"typescript-operations": {
preResolveTypes: true,
omitObjectTypes: true,
},
},
{
"graphql-codegen-typescript-operation-types": {
enumsAsTypes: true,
},
},
],
Comment on lines +28 to +40
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The typescript base plugin has been removed but typescript-operations requires it as a prerequisite. The typescript plugin generates the base GraphQL schema types that typescript-operations depends on. Without it, the code generation will fail.

Copilot uses AI. Check for mistakes.
config: {
scalars: {
Day: "number",
Expand Down
16 changes: 14 additions & 2 deletions codegen-staging.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CodegenConfig } from "@graphql-codegen/cli";
import { type CodegenConfig } from "@graphql-codegen/cli";

const config: CodegenConfig = {
schema: "./schema-staging.graphql",
Expand All @@ -21,7 +21,19 @@ const config: CodegenConfig = {
plugins: ["typescript-apollo-client-helpers"],
},
"./src/graphql/typesStaging.generated.ts": {
plugins: ["typescript", "typescript-operations"],
plugins: [
{
"typescript-operations": {
preResolveTypes: true,
omitObjectTypes: true,
},
},
{
"graphql-codegen-typescript-operation-types": {
enumsAsTypes: true,
},
},
],
Comment on lines +24 to +36
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The typescript base plugin has been removed but typescript-operations requires it as a prerequisite. The typescript plugin generates the base GraphQL schema types that typescript-operations depends on. Without it, the code generation will fail.

Copilot uses AI. Check for mistakes.
config: {
nonOptionalTypename: true,
avoidOptionals: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
"eslint-plugin-unused-imports": "^4.3.0",
"front-matter": "^4.0.2",
"globals": "^16.5.0",
"graphql-codegen-typescript-operation-types": "2.0.2",
"graphql-config": "^5.1.5",
"html-to-react": "^1.7.0",
"identity-obj-proxy": "^3.0.0",
Expand Down
80 changes: 80 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading