Bael 3893 - Code review updates
This commit is contained in:
parent
8b6c667ce0
commit
c10208b4d9
|
@ -11,7 +11,7 @@ import java.util.Map;
|
|||
public class AppSyncClientHelper {
|
||||
|
||||
static String apiUrl = "https://m4i3b6icrrb7livfbypfspiifi.appsync-api.us-east-2.amazonaws.com";
|
||||
static String apiKey = "da2-es2s6oj4mzhbxk5yu26ss2ruj4";
|
||||
static String apiKey = "da2-bm4rpatkkrc5jfyhvvq7itjeke";
|
||||
static String API_KEY_HEADER = "x-api-key";
|
||||
|
||||
public static WebClient.ResponseSpec getResponseBodySpec(Map<String, Object> requestBody) {
|
||||
|
|
|
@ -16,7 +16,17 @@ class AwsAppSyncApplicationTests {
|
|||
void givenGraphQuery_whenListEvents_thenReturnAllEvents() {
|
||||
|
||||
Map<String, Object> requestBody = new HashMap<>();
|
||||
requestBody.put("query", "query ListEvents { listEvents { items { id name where when description } } }");
|
||||
requestBody.put("query", "query ListEvents {" +
|
||||
" listEvents {" +
|
||||
" items {" +
|
||||
" id" +
|
||||
" name" +
|
||||
" where" +
|
||||
" when" +
|
||||
" description" +
|
||||
" }" +
|
||||
" }" +
|
||||
"}");
|
||||
requestBody.put("variables", "");
|
||||
requestBody.put("operationName", "ListEvents");
|
||||
|
||||
|
@ -32,9 +42,18 @@ class AwsAppSyncApplicationTests {
|
|||
@Test
|
||||
void givenGraphAdd_whenMutation_thenReturnIdNameDesc() {
|
||||
|
||||
String queryString = "mutation add { createEvent( name:\"My added GraphQL event\" where:\"Day 2\"" +
|
||||
" when:\"Saturday night\" description:\"Studying GraphQL\" ){ id name description } }";
|
||||
|
||||
String queryString = "mutation add {" +
|
||||
" createEvent(" +
|
||||
" name:\"My added GraphQL event\"" +
|
||||
" where:\"Day 2\"" +
|
||||
" when:\"Saturday night\"" +
|
||||
" description:\"Studying GraphQL\"" +
|
||||
" ){" +
|
||||
" id" +
|
||||
" name" +
|
||||
" description" +
|
||||
" }" +
|
||||
"}";
|
||||
|
||||
Map<String, Object> requestBody = new HashMap<>();
|
||||
requestBody.put("query", queryString);
|
||||
|
|
Loading…
Reference in New Issue