Как импортировать запрос graphql в основной деятельности. java? - PullRequest
0 голосов
/ 22 января 2020
private void getRetRestaurantByID(String restaurantID) {

        ApolloConnector.setupApollo().query(getAllProduct
                        .builder()
                        .restaurantID(restaurantID)
                        .build())
                .enqueue(new ApolloCall.Callback<getAllProduct.Data>() {

                    @Override
                    public void onResponse(@NotNull Response<getAllProduct.Data> response) {

                        Log.d(TAG, "Response: " + response.data().getAllProduct);
                    }

                    @Override
                    public void onFailure(@NotNull ApolloException e) {

                        Log.d(TAG, "Exception " + e.getMessage(), e);
                    }
                });
    }
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...