operationOutputGenerator

Deprecated

Use ApolloCompilerPlugin.operationIds() instead. See https://go.apollo.dev/ak-compiler-plugins for more details.

A generator to generate the operation output from a list of operations. OperationOutputGenerator is similar to OperationIdGenerator but can work on lists. This is useful if you need to register/whitelist your operations on your server all at once.

Example Md5 hash generator:

import com.apollographql.apollo3.compiler.OperationIdGenerator

apollo {
service("service") {
operationOutputGenerator = new OperationIdGenerator() {
String apply(List<operation operationDocument, String operationFilepath) {
return operationDocument.md5()
}

/**
* Use this version override to indicate an update to the implementation.
* This invalidates the current cache.
*/
String version = "v1"
}
}
}

Default value: OperationIdGenerator.Sha256