We have created a sample product catalog app that is built using GraphQL Client SDK. The content of this app is powered by Contentstack GraphQL APIs, and the app uses GraphQL Client on the client side to consume GraphQL APIs.
This document covers the steps to get this app up and running. Try out the steps mentioned in the guide before building large scale applications.
Contentstack is a headless CMS with an API-first approach that puts content at the centre. It is designed to simplify the process of publication by separating code from content.
- To get your app up and running quickly, we have created a sample .NET Product Catalog for this project. You will need to download the code and change the configuration. Download the code using the command given below:
$ git clone https://github.com/contentstack/contentstack-dotnet-graphql-example.git
-
Once you have downloaded the project, add your Contentstack API Key, Delivery Token, and Environment name to the application settings. If you're new to Contentstack, follow these links to learn how to find your Stack's API Key and Delivery Token. Read more about Environments.
-
Open
ContentstackGraphQLExample/appsettings.json
and inject your credentials as shown below:
{
....
"ContentstackOptions": {
"Host": "<HOST_NAME>",
"ApiKey": "<API_KEY>",
"DeliveryToken": "<DELIVERY_TOKEN>",
"Environment": "<ENVIRONMENT_NAME>"
},
...
}
Note: You should set the
Host
value to one of the base GraphQL URLs for Contentstack. For example, the North American URL is https://graphql.contentstack.com and the European URL is https://graphql-eu.contentstack.com.
- Now that we have a working project ready, you can build and run it.
We've also created a guide that further explains this project. Click here