You need API keys from the API Manager (Gravitee) to access the API.
The application supports both the TEST and the PROD endpoints of the FS GraphQL API.
- Go to Applications
- Create a new appliction (if you have an application you can reuse it)
- Name the application using your username as a prefix: eg: tle001-fsgraphql-test
- Go to API catalog. Search for "FS GraphQL API"
- Use the "Subscribe" button and choose the plan "Test: Read access". Press "Next"
- Choose you application. Press "Next"
- Press "Validate the request"
You will find your API keys under your application, submenu "subscriptions" Click on the API and you will se your API key.
Edit "appsettings.json" and add your API key. Make sure you don't commit the API key to github
Download GraphQL schema and create the Strawberryshake client
cd .\FsGraphqlDemo\
dotnet graphql update -x X-Gravitee-Api-Key=API-KEY
Build the project
dotnet build
.\bin\Debug\net9.0\FsGraphqlDemo.exe --help
.\bin\Debug\net9.0\FsGraphqlDemo.exe students
.\bin\Debug\net9.0\FsGraphqlDemo.exe events
.\bin\Debug\net9.0\FsGraphqlDemo.exe feide username1,username2
.\bin\Debug\net9.0\FsGraphqlDemo.exe semreg
.\bin\Debug\net9.0\FsGraphqlDemo.exe checkSemreg
Use the flag --endpoint to switch between TESt and PROD endpoints. TEST is the default.
.\bin\Debug\net9.0\FsGraphqlDemo.exe feide tle001 --endpoint prod