apollo-client-maven-plugin icon indicating copy to clipboard operation
apollo-client-maven-plugin copied to clipboard

Upgrading to 7.1.0 throws an error about operationOutput

Open nechama-z opened this issue 1 year ago • 4 comments

Upgrading to 7.1.0 with no other changes gives an error on generate-sources Execution default of goal com.github.aoudiamoncef:apollo-client-maven-plugin:7.1.0:generate failed: Apollo: operationOutput requires a manifest file

I see this parameter was added but I'm not sure what the values should be

nechama-z avatar Jan 03 '24 13:01 nechama-z

Hi, try to disable It if you don't need it, as it's enabled by default

aoudiamoncef avatar Jan 03 '24 15:01 aoudiamoncef

As @aoudiamoncef said the manifest format is now set by default to "operationOutput" instead of "none" as it was before.

This change wasn't backwards compatible. My apologies for that.

As a workaround you can set the 'operationManifestFormat' property manually to 'none'

<compilerParams>
....
    <operationManifestFormat>none</operationManifestFormat>
....
</compilerParams>

rruizt avatar Jan 03 '24 16:01 rruizt

Perfect, that worked. Thank you @rruizt and @aoudiamoncef. (What would be needed to get the output to work properly? Is it something on my schema? Is there more information about this field anywhere?)

nechama-z avatar Jan 03 '24 16:01 nechama-z

In order to setup the operation manifest generation you need to also set the property generateOperationDescriptors to true.

<compilationUnit>
    <generateOperationDescriptors>false</generateOperationDescriptors>
    <compilerParams>
    ....
        <operationManifestFormat>persistedQueryManifest</operationManifestFormat>
    ....
    </compilerParams>
</compilationUnit>

You can check the valid formats here

rruizt avatar Jan 04 '24 09:01 rruizt