Esempio n. 1
0
        public async Task <BrewViewModel> GetBrew(string productId)
        {
            var graphQlRequest = new GraphQLRequest()
            {
                Query     = Queries.Brew,
                Variables = new { productId }
            };

            var response = await m_client.SendQueryAsync(graphQlRequest, () => new { brew = new Brew() });

            return(m_modelMapper.Mapper(response.Data.brew));
        }
Esempio n. 2
0
        public async Task <BrewViewModel> GetBrew(string productId)
        {
            var brew = await JsonReader.ReadFromJson <Brew>("BrewDetail.json");

            return(m_mapper.Mapper(brew));
        }