public async Task <SiteViewModel> UpdateSiteAsync(Guid id, SiteViewModel siteToUpdate) { var query = new GraphQLRequest { Query = @" mutation($site: siteInput!, $siteId: ID!){ updateSite(site: $site, siteId: $siteId){ id name culture domain } }", Variables = new { site = siteToUpdate, siteId = id } }; var response = await _client.PostAsync(query); return(response.GetDataFieldAs <SiteViewModel>("updateSite")); }
public async Task <SiteViewModel> CreateSiteAsync(SiteViewModel siteToCreate) { var query = new GraphQLRequest { Query = @" mutation($site: siteInput!){ createSite(site: $site){ id name culture domain } }", Variables = new { site = siteToCreate } }; var response = await _client.PostAsync(query); return(response.GetDataFieldAs <SiteViewModel>("createSite")); }
public void OnGet() { Site = _client.GetSiteByCultureAsync("en-GB").Result; }
public Task <SiteViewModel> UpdateSiteAsync(Guid id, SiteViewModel siteToUpdate) { throw new NotImplementedException(); }
public Task <SiteViewModel> CreateSiteAsync(SiteViewModel siteToCreate) { throw new NotImplementedException(); }