Public GitHub Repository
You can find our public repository here https://github.com/SellerCloudTeam/graphql-api-samples. In it you will find two sample projects to draw example from – one JS client and one C# console app. Feel free to view, download and clone this project and experiment with your server graphql API.
Sample JS Project
Under the JS folder you will find a small React + Apollo app, which demonstrates the basic usage and main features of GraphQL.
In order to run this app locally, you need to
- clone the repository to your local environment.
- run npm install from inside the graphql-api-samples/src/js/ directory.
- find the config.js file inside the graphql-api-samples/src/js/src directory and modify line 4 to include a reference to your server.
- run npm start from inside the graphql-api-samples/src/js/ directory.
Sample C# Project
Under the csharp folder you will find a small console application which demonstrates how you can consume the API in .NET.
- clone the repository to your local environment.
- open the solutions in Visual Studio and find the Program.cs file in the Sample.DotNetFramework project. Modify lines 15, 18-19 to match your server id and credentials.
- Build and run the project.