Example #1
0
        public async Task <ActionResult> Article(string SlugQuery)
        {
            using var graphQLClient = new GraphQLHttpClient(Baseurl, new NewtonsoftJsonSerializer());

            var graphQLResponse = await graphQLClient.SendQueryAsync <Models.Articles>(query.getArticleById(SlugQuery));


            //Console.WriteLine(SlugQuery);
            //Console.WriteLine("raw response:");
            //Console.WriteLine(JsonSerializer.Serialize(graphQLResponse, new JsonSerializerOptions { WriteIndented = true }));

            return(View(graphQLResponse.Data));
        }