Spring Boot GraphQL Tutorial #20 - Listener

Pubblicato il: 19 settembre 2020
sul canale di: Philip Starritt
4,586
33

The GraphQL Servlet library allows you to add a Servlet Listener for listening to the GraphQL request. It provides hooks into the servlet request execution (request, success, error, and finally).

The Servlet Listener listens to the servlet request, but not to the GraphQL query execution. If you want to listen to that (pre/post resolver methods etc) you should use the Instrumentation provided by GraphQL Java.

In this simple example, I log the complete graphql request execution time.

See AbstractGraphQLHttpServlet for where and when the hook points above are executed.

Thanks,
Philip

Spring Boot GraphQL: https://github.com/graphql-java-kicks...

Java GraphQL Servlet Listener: https://www.graphql-java-kickstart.co...


In questa pagina del sito puoi guardare il video online Spring Boot GraphQL Tutorial #20 - Listener della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Philip Starritt 19 settembre 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 4,586 volte e gli è piaciuto 33 spettatori. Buona visione!