Class GraphQLRequestParamUtils

  • All Implemented Interfaces:

    
    public final class GraphQLRequestParamUtils
    
                        

    Utilities to (de)serialize GraphQL request parameters.

    • Constructor Detail

    • Method Detail

      • isGraphQLContentType

         static boolean isGraphQLContentType(String contentType)

        Return true if the content type is GraphQL content type (i.e. 'application/json').

        Parameters:
        contentType - Content-Type value
        Returns:

        true if the content type is GraphQL content type

      • toPostBodyString

         static String toPostBodyString(GraphQLRequestParams params)

        Convert the GraphQL request parameters input data to an HTTP POST body string.

        Parameters:
        params - GraphQL request parameter input data
        Returns:

        an HTTP POST body string converted from the GraphQL request parameters input data

      • queryToGetParamValue

         static String queryToGetParamValue(String query)

        Convert the GraphQL Query input string into an HTTP GET request parameter value.

        Parameters:
        query - the GraphQL Query input string
        Returns:

        an HTTP GET request parameter value converted from the GraphQL Query input string

      • variablesToGetParamValue

         static String variablesToGetParamValue(String variables)

        Convert the GraphQL Variables JSON input string into an HTTP GET request parameter value.

        Parameters:
        variables - the GraphQL Variables JSON input string
        Returns:

        an HTTP GET request parameter value converted from the GraphQL Variables JSON input string