Currently, the documentation doesn’t have any info about the @secret directive.
Can You supply some explanation on what it does and how to use it?
I thought about using it in order to implement an api access key - secret key combination where the secret key is decorated with this directive.
type User {
hasCredntials: [Credentials!]
}
type Credentials {
accessKey: String! @search(by: [hash]) @id
secretKey: String! @secret
ofUser: User! @hasInverse(field: hasCredentials)
}
Let’s say I have a server that gets both the keys from some script I want to use this scheme to be able to check if the combination that the script sent is valid and if true return the username of the user it belongs to.
How can I make such a query?