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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make GraphQLGenerateClientTask and GraphQLGenerateTestClientTask cacheable #1986

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ajaybirratoul
Copy link

@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
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
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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants