use of com.example.graphql.client.betterbotz.atomic.BulkInsertProductsWithAtomicMutation in project stargate by stargate.
the class BulkInsertTest method bulkInsertProductsWithAtomic.
private List<BulkInsertProductsWithAtomicMutation.BulkInsertProduct> bulkInsertProductsWithAtomic(ApolloClient client, List<ProductsInput> productsInputs) {
BulkInsertProductsWithAtomicMutation mutation = BulkInsertProductsWithAtomicMutation.builder().values(productsInputs).build();
BulkInsertProductsWithAtomicMutation.Data result = getObservable(client.mutate(mutation));
assertThat(result.getBulkInsertProducts()).isPresent();
assertThat(result.getBulkInsertProducts()).isPresent();
assertThat(result.getBulkInsertProducts().get().size()).isEqualTo(productsInputs.size());
return result.getBulkInsertProducts().get();
}
Aggregations