https://kotlinlang.org logo
Title
d

Dusan Hornik

09/26/2021, 8:52 AM
Hello, I am looking for an example on how to implement query directive. Documentation mentions two query directive
@skip
and
@include
and I am trying to implement
@skipCache
query directive. The idea is that if request/client annotates field with
@skipCache
the server will always recalculate the latest values (instead of using cached one).
d

Dariusz Kuc

09/29/2021, 3:50 AM
👋
@skip
and
@include
are "special" built-in directives
d

Dusan Hornik

09/29/2021, 3:56 AM
Thank you Dariusz. That documentation is about Schema directives. Is there an example on how to do query directive (sometimes called operation directive)?
d

Dariusz Kuc

09/29/2021, 1:26 PM
I am unsure whether you can easily create query directive as it has to be somehow understood by your client gql java docs only cover schema directives as well (https://www.graphql-java.com/documentation/v17/)