Class GraphQLUtils
- java.lang.Object
-
- com.atlassian.confluence.rest.client.graphql.GraphQLUtils
-
@Internal public class GraphQLUtils extends Object
Helper methods for building GraphQL request strings.- Since:
- 6.12.0
-
-
Constructor Summary
Constructors Constructor Description GraphQLUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
buildGraphQLFieldArgumentsString(Map<String,Object> arguments)
Get a string with graph-ql field arguments, suitable for use in a graph-ql query string.static String
buildQuery(String queryFieldName, String queryFragment, Map<String,Object> arguments)
Build a GraphQL query string from a field name, query arguments and query body fragment.static String
buildRequestString(String query)
Build a request string for a graph-ql REST API request.static String
buildRequestString(String queryFieldName, String queryFragment, Map<String,Object> arguments)
Build a request string for a graph-ql REST API request.
-
-
-
Method Detail
-
buildRequestString
public static String buildRequestString(String queryFieldName, String queryFragment, Map<String,Object> arguments)
Build a request string for a graph-ql REST API request.- Parameters:
queryFieldName
- The name of the query field in the graphqueryFragment
- The graphql query fragment that within the query field namearguments
- The arguments to the query field- Returns:
- The request string, suitable for passing to the body of a graphql REST endpoint
-
buildQuery
public static String buildQuery(String queryFieldName, String queryFragment, Map<String,Object> arguments)
Build a GraphQL query string from a field name, query arguments and query body fragment.- Parameters:
queryFieldName
- The name of the query field in the graphqueryFragment
- The graphql query fragment that resides within the query field namearguments
- The arguments to the query field- Returns:
- The query string
-
buildRequestString
public static String buildRequestString(String query)
Build a request string for a graph-ql REST API request.- Parameters:
query
- The GraphQL query- Returns:
- The request string, suitable for passing to the body of a graphql REST endpoint
-
-