Is there any way to configure the v3 plugin programatically, like from another Gradle plugin?

For the old v1 plugin I can do something like this in my Gradle plugin:

extensions.getByType<ApolloExtension>().apply {
    // etc...

But for the v3 plugin, I can’t access com.apollographql.apollo3.gradle.api.ApolloExtension. I don’t see it marked as internal, but extensions.getByType<com.apollographql.apollo3.gradle.api.ApolloExtension>() won’t compile.

Is there any way to programmatically configure the v3 plugin?

This appears to work, although I need to test in a project that uses my plugin.

extensions.getByName("apollo").withGroovyBuilder {
    invokeMethod("service", arrayOf("test", Action<Any> { }))
    // etc...

This appears to be a bug in IntelliJ’s Kotlin plugin. Code that displays as “red” in the IDE actually compiles and runs.