Apollo IOS Codegen CLI duplicate files

Hi All,
I generated graphql swift files using Apollo Codegen - The Codegen CLI - Apollo GraphQL Docs
But when I added files to project then I see duplicate swift file under fragments folder and Schema->Objects folder.

Below is the error
Filname “XXX.grapgql.swift” used twice.
“path/customer/Fragraments/XXX.grapgql.swift”
“path/customer/Schema/Objects/XXX.grapgql.swift”

Appreciate any help to resolve this.

Hi @vijayviswas - that is probably because you have an object and a fragment with the same name. One way to resolve this is to rename the fragment in your operation definition file.

We’re tracking this kind of error in a few issues, which you can watch to keep track of:

Thanks @calvincestari