{{#unless @root.config.noHOC}}
    {{#each operations }}
        {{#unless @root.config.noNamespaces}}
        export namespace {{toPascalCase name}} {
        {{/unless}}
            export function {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}HOC<TProps = {}>(operationOptions: ReactApollo.OperationOption<TProps, {{toPascalCase operationType}}, Variables>){
                return ReactApollo.graphql<TProps, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}{{toPascalCase operationType}}, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}Variables>(
                    {{#unless @root.config.noGraphqlTag}}gql` {{ document }} `{{else}}{{{ gql document }}}{{/unless}},
                    operationOptions
                )
            };
        {{#unless @root.config.noNamespaces}}
        }
        {{/unless}}
    {{/each}}
{{/unless}}
{{#unless @root.config.noHOC}}
    {{#each operations }}
        {{#unless @root.config.noNamespaces}}
        export namespace {{toPascalCase name}} {
        {{/unless}}
            export function {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}HOC<TProps = {}>(operationOptions: ReactApollo.OperationOption<TProps, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}{{toPascalCase operationType}}, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}Variables>){
                return ReactApollo.graphql<TProps, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}{{toPascalCase operationType}}, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}Variables>(
                    {{#unless @root.config.noGraphqlTag}}gql` {{ document }} `{{else}}{{{ gql document }}}{{/unless}},
                    operationOptions
                )
            };
        {{#unless @root.config.noNamespaces}}
        }
        {{/unless}}
    {{/each}}
{{/unless}}
Use extended types when noNamespaces is true
Use extended types when noNamespaces is true
