Skip to content
Discussion options

You must be logged in to vote

Took me ages to get a client going, my fault, not the fault of the library.

I ended up creating a common function to be called by my integration tests.

public static String simpleJsonCall(String query, String JSONPath) {

		// The GraphQLResponse contains data and errors.
		Mono<GraphQLResponse> graphQLResponseMono = graphQLClient.reactiveExecuteQuery(query);
		Mono<LinkedHashMap> obj = graphQLResponseMono.flatMap(r -> {
			if (r.hasErrors()) {
				log.error("[simpleJsonCall] {}", r.getErrors().toString());
				return Mono.error(new RuntimeException(r.getErrors().toString()));
			}
			if (r.extractValue(JSONPath) == null) {
				log.error("[simpleJsonCall] No results found for {}", JSONPath)…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ssona09
Comment options

Comment options

You must be logged in to vote
1 reply
@ssona09
Comment options

Answer selected by ssona09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants