The file with generated types has duplicate types. Config file: import type { CodegenConfig } from "@graphql-codegen/cli"; const config: CodegenConfig = { overwrite: true, schema: "https://spacexdata.herokuapp.com/graphql", documents: "./src/components/**/*.{ts,tsx}", generates: { "src/generated/gql": { preset: "client", plugins: [ "typescript", "typescript-operations", "typescript-react-apollo", ], config: { withHooks: true, }, }, }, }; export default config;