Search in sources :

Example 1 with BulkInsertProductsWithAtomicMutation

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();
}
Also used : InsertOrdersAndBulkInsertProductsWithAtomicMutation(com.example.graphql.client.betterbotz.atomic.InsertOrdersAndBulkInsertProductsWithAtomicMutation) BulkInsertProductsWithAtomicMutation(com.example.graphql.client.betterbotz.atomic.BulkInsertProductsWithAtomicMutation)

Aggregations

BulkInsertProductsWithAtomicMutation (com.example.graphql.client.betterbotz.atomic.BulkInsertProductsWithAtomicMutation)1 InsertOrdersAndBulkInsertProductsWithAtomicMutation (com.example.graphql.client.betterbotz.atomic.InsertOrdersAndBulkInsertProductsWithAtomicMutation)1