Is your feature request related to a problem? Please describe.
We at Wayfair use a different hashing mechanism than standard SHA256 supported by Apollo, We have implemented it by forking but would like to share the solution with the apollo community so everyone can use it.
Describe the solution you'd like
We would like to contribute by adding a generic method where client can tell which hashing algo to use for the queries. We already have the solution and would like to see if apollo wants to support this algorithm that will work for other teams and organizations wanting to use it.
We would love to add such support, please feel free to open PR.
@SaurabhKukreja Not sure what you had in mind but maybe make this a HashingAlgorithm class ? not just a string like "SHA256" ? This way it's complely customizable and we can have HashingAlgorithmSha256, HashingAlgorithmMD5, etc...
I guess this should be a gradle configuration ? That would help ensure that transformed queries use the same algorithm as the runtime ?
Sure. will make it generic as possible
@SaurabhKukreja I'm interested in this topic too regarding a generic solution (instead of just choosing a different hashing algorithm, calling a service / a CLI for getting the ID) and created the above tagged issue #1834 . Is there an existing PR? I can contribute to that.
We discussed this quickly with @DSteve595 and the conclusion was that doing this 100% customizable while still keeping the gradle tasks incremental & cacheable would certainly require to split the current task in 2/3 tasks:
generateCode would take the input from generateIR and generateHashes (or something similar, not 100% clear yet).