import type { CodegenConfig } from "@graphql-codegen/cli";

const config: CodegenConfig = {
  schema: "./src/gql/schema.graphql",
  documents: ["src/**/*.vue", "src/graphql/**/*.ts"],
  ignoreNoDocuments: true,
  hooks: {
    afterAllFileWrite: ["node minimizeGraphqlSchema.mjs"],
  },
  generates: {
    "./src/gql/": {
      preset: "client",
      config: {
        useTypeImports: true,
      },
      plugins: [],
    },
  },
};

export default config;
