Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DocumentTransform API #5809

Merged
merged 4 commits into from
Apr 16, 2024
Merged

Add DocumentTransform API #5809

merged 4 commits into from
Apr 16, 2024

Conversation

martinbonnin
Copy link
Contributor

@martinbonnin martinbonnin commented Apr 15, 2024

Closes #5807

PS: I also took a quick look at adding an API like

fun write(schema: Schema, operations: List<GQLOperationDefinition>, outputDir: File) 

to allow contributing more files to the codegen but I ended up backtracking because the GQLOperationDefinition are not available in the codegen phase. All in all, I think this is better served by a custom Gradle task outside of the Apollo Gradle Plugin.

@martinbonnin martinbonnin requested a review from BoD as a code owner April 15, 2024 07:40
Copy link

netlify bot commented Apr 15, 2024

Deploy Preview for apollo-android-docs canceled.

Name Link
🔨 Latest commit 5f5db6d
🔍 Latest deploy log https://app.netlify.com/sites/apollo-android-docs/deploys/661d550530343100089cac9e

@martinbonnin martinbonnin marked this pull request as ready for review April 15, 2024 16:46
@martinbonnin
Copy link
Contributor Author

In light of #5807 (comment), I'd vote for merging this one as experimental so we can play with it.

Copy link
Contributor

@BoD BoD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -72,10 +72,10 @@ fun ApolloGenerateSourcesBaseTask.layout(): LayoutFactory {
fun ApolloGenerateSourcesBaseTask.requiresBuildscriptClasspath(): Boolean {
if (packageNameGenerator != null || operationOutputGenerator != null) {
if (packageNameGenerator != null) {
logger.lifecycle("Apollo: packageNameGenerator is deprecated, use Apollo compiler plugins instead")
logger.lifecycle("Apollo: packageNameGenerator is deprecated, use Apollo compiler plugins instead. See https://go.apollo.dev/ak-compiler-plugins for more details.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noice!

@martinbonnin martinbonnin merged commit c016f84 into main Apr 16, 2024
9 checks passed
@martinbonnin martinbonnin deleted the plugin-apis branch April 16, 2024 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler plugin: add a GQLDocumentTransform API
2 participants