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

const config: CodegenConfig = {
  schema: '../backend/src/**/*.graphql',
  generates: {
    './src/app/aurora.types.ts': {
      plugins: ['typescript'],
      config: {
        useTypeImports: true,
        enumsAsTypes: false,
        namingConvention: {
          enumValues: 'keep',
        },
        strictScalars: true,
        defaultScalarType: 'unknown',
        scalars: {
          GraphQLString: 'string',
          GraphQLInt: 'number',
          GraphQLFloat: 'number',
          GraphQLBoolean: 'boolean',
          GraphQLISODateTime: 'string',
          GraphQLTimestamp: 'number',
          JSON: 'any',
          Any: 'any',
          Upload: 'File',
        },
      },
    },
  },
};
export default config;
