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

Make GraphQLGenerateClientTask and GraphQLGenerateTestClientTask cacheable #1986

Merged
merged 3 commits into from
Jul 8, 2024

Conversation

ajaybirratoul
Copy link
Contributor

@ajaybirratoul ajaybirratoul commented Jun 25, 2024

📝 Description

  • We can leverage caching in Gradle for GraphQLGenerateClientTask and GraphQLGenerateTestClientTask by annotating them with @CacheableTask
  • Also annotate schemaFile, queryFileDirectory, queryFiles with @PathSensitive(PathSensitivity.RELATIVE) for the purposes of normalization so that outputs can be reused for caching
  • Gradle docs: https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/CacheableTask.html

@dariuszkuc
Copy link
Collaborator

Can you also update the test client generation task to cacheable?

@ajaybirratoul ajaybirratoul changed the title Make GraphQLGenerateClientTask cacheable Make GraphQLGenerateClientTask and GraphQLGenerateTestClientTask cacheable Jun 25, 2024
@ajaybirratoul
Copy link
Contributor Author

Can you also update the test client generation task to cacheable?

@dariuszkuc done!

@dariuszkuc
Copy link
Collaborator

@ajaybirratoul looks like some additional changes are needed?

@ajaybirratoul
Copy link
Contributor Author

@dariuszkuc it seems like we need to declare a normalization strategy for some of the properties when enabling caching (workflow output)

image

I've made the recommend change by annotating relevant properties with @PathSensitive(PathSensitivity.RELATIVE).

@ajaybirratoul ajaybirratoul requested a review from dariuszkuc July 4, 2024 12:00
@dariuszkuc dariuszkuc added changes: patch Changes require a patch version module: plugin Issue affects the plugins code labels Jul 8, 2024
@dariuszkuc dariuszkuc merged commit c8e9366 into ExpediaGroup:master Jul 8, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes: patch Changes require a patch version module: plugin Issue affects the plugins code
Development

Successfully merging this pull request may close these issues.

2 participants