dotansimha/graphql-code-generator-community

Add option to throw on duplicate operation name in named-operations-object

JonathanWbn opened this issue · 2 comments

Is your feature request related to a problem? Please describe.

The named-operations-object plugin creates an object referencing all operations by name. This gives the impression that each operation is unique and only has one definition. But there might be multiple operations defined with the same name.

Describe the solution you'd like

I propose adding an option to the named-operations-object plugin that enables throwing an error when a duplicate definition is found.

Opened a PR here: #775