use of com.amazonaws.mobileconnectors.appsync.AppSyncMutationCall in project aws-mobile-appsync-sdk-android by awslabs.
the class ApolloCallTracker method registerCall.
/**
* <p>Adds provided {@link GraphQLCall} that is currently in progress.</p>
*
* <p><b>Note</b>: This method needs to be called right before an apolloCall is executed.</p>
*/
void registerCall(@Nonnull GraphQLCall call) {
checkNotNull(call, "call == null");
Operation operation = call.operation();
if (operation instanceof Query) {
registerQueryCall((AppSyncQueryCall) call);
} else if (operation instanceof Mutation) {
registerMutationCall((AppSyncMutationCall) call);
} else if (operation instanceof Subscription) {
} else {
throw new IllegalArgumentException("Unknown call type");
}
}
use of com.amazonaws.mobileconnectors.appsync.AppSyncMutationCall in project aws-mobile-appsync-sdk-android by awslabs.
the class ApolloCallTracker method unregisterCall.
/**
* <p>Removes provided {@link GraphQLCall} that finished his execution, if it is found, else throws an
* {@link AssertionError}.</p>
*
* If the removal operation is successful and no active running calls are found, then the registered
* {@link ApolloCallTracker#idleResourceCallback} is invoked.
*
* <p><b>Note</b>: This method needs to be called right after an apolloCall is completed (whether successful or
* failed).</p>
*/
void unregisterCall(@Nonnull GraphQLCall call) {
checkNotNull(call, "call == null");
Operation operation = call.operation();
if (operation instanceof Query) {
unregisterQueryCall((AppSyncQueryCall) call);
} else if (operation instanceof Mutation) {
unregisterMutationCall((AppSyncMutationCall) call);
} else if (operation instanceof Subscription) {
} else {
throw new IllegalArgumentException("Unknown call type");
}
}
Aggregations