Package 

Class GraphQLExtractor


  • 
    public final class GraphQLExtractor
    
                        

    Extracts GraphQL-related attributes and errors from network requests and responses.

    • Method Summary

      Modifier and Type Method Description
      final Map<String, Object> extractGraphQLAttributes(HttpRequestInfo requestInfo) Extracts GraphQL attributes (operation name, type, variables, payload) from the request headers.
      final String extractGraphQLErrors(String contentType, String body, InternalLogger internalLogger) Extracts and normalizes GraphQL errors from a JSON response body.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GraphQLExtractor

        GraphQLExtractor()
    • Method Detail

      • extractGraphQLAttributes

         final Map<String, Object> extractGraphQLAttributes(HttpRequestInfo requestInfo)

        Extracts GraphQL attributes (operation name, type, variables, payload) from the request headers.

        Parameters:
        requestInfo - the HTTP request info containing headers
      • extractGraphQLErrors

         final String extractGraphQLErrors(String contentType, String body, InternalLogger internalLogger)

        Extracts and normalizes GraphQL errors from a JSON response body.

        Parameters:
        contentType - the content type of the response
        body - the response body string
        internalLogger - the logger for reporting parsing failures