Search in sources :

Example 1 with BulkInsertProductsMutation

use of com.example.graphql.client.betterbotz.products.BulkInsertProductsMutation in project stargate by stargate.

the class BulkInsertTest method bulkInsertProducts.

private List<BulkInsertProductsMutation.BulkInsertProduct> bulkInsertProducts(ApolloClient client, List<ProductsInput> productsInputs) {
    BulkInsertProductsMutation mutation = BulkInsertProductsMutation.builder().values(productsInputs).build();
    BulkInsertProductsMutation.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 : BulkInsertProductsMutation(com.example.graphql.client.betterbotz.products.BulkInsertProductsMutation)

Aggregations

BulkInsertProductsMutation (com.example.graphql.client.betterbotz.products.BulkInsertProductsMutation)1