@PublicApi public class AstSignature extends java.lang.Object
Constructor and Description |
---|
AstSignature() |
Modifier and Type | Method and Description |
---|---|
Document |
privacySafeQuery(Document document,
java.lang.String operationName)
This can produce a "privacy safe" AST that some what conforms to the algorithm as outlined
here
which removes excess operations, removes any field aliases, hides some literal values and sorts the result.
|
Document |
signatureQuery(Document document,
java.lang.String operationName)
This can produce a "signature" canonical AST that conforms to the algorithm as outlined
here
which removes excess operations, removes any field aliases, hides literal values and sorts the result into a canonical
query.
|
public Document signatureQuery(Document document, java.lang.String operationName)
document
- the document to make a signature query fromoperationName
- the name of the operation to do it for (since only one query can be run at a time)public Document privacySafeQuery(Document document, java.lang.String operationName)
signatureQuery(Document, String)
which collapses literals to create more canonical signatures. A privacy safe Query is useful for logging say to show
what shapes was asked for without revealing what data was provideddocument
- the document to make a privacy safe query fromoperationName
- the name of the operation to do it for (since only one query can be run at a time)