javav2/example_code/appsync/README.md
This README discusses how to run and test the AWS SDK for Java (V2) examples for AWS AppSync.
AWS AppSync provides a robust, scalable GraphQL interface for application developers to combine data from multiple sources, including Amazon DynamoDB, AWS Lambda, and HTTP APIs.
The credential provider used in all code examples is ProfileCredentialsProvider. For more information, see Using credentials.
The following examples use the AppSyncClient object:
Some of these examples perform destructive operations on AWS resources, such as deleting an AWS AppSync data source. Be very careful when running an operation that deletes or modifies AWS resources in your account. We recommend creating separate test-only resources when experimenting with these examples.
To run these examples, set up your development environment. For more information, see Get started with the SDK for Java.
You can test the Java code examples for AWS AppSync Java by running a test file named AppSyncTest. This file uses JUnit 5 to run the JUnit tests and is located in the src/test/java folder. For more information, see https://junit.org/junit5/.
You can run the JUnit tests from an IDE, such as IntelliJ, or from the command line. As each test runs, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed.
Test 3 passed
WARNING: Running these JUnit tests manipulates real Amazon resources and might incur charges on your account.
Before running the AWS Elastic Beanstalk JUnit tests, you must define values in the config.properties file located in the resources folder. This file contains values that are required to run the JUnit tests. For example, you define a crawler name used in the tests. If you do not define all values, the JUnit tests fail.
Define these values to successfully run the JUnit tests:
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0