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();
}
Aggregations