product-microgateway
product-microgateway copied to clipboard
GraphQL API invocation support for Choreo Connect
Describe your problem(s)
Currently Choreo Connect doesn't provide support for the GraphQL APIs. Similar to the API invocations that happen in WSO2 API-M using the synapse gateway, we can enable the GraphQL support in Choreo Connect also.
Describe your solution
For a given GraphQL API, we can provide a single route. Then we can configure Router and the Enforcer as per the API project. When invoking the API, GraphQL query can be passed to the enforcer and in the Enforcer we can do the relevant validations according to the API project specifications and support GraphQL API invocations.
How will you implement it
-
[x] Configure Enforcer and Router as per the API project using the Adapter.
- Implementations to to read API project and populate mgwSwagger as per the configurations.
- Creation of clusters, routes for the GraphQL APIs.
- Test case addition and error logs.
-
[x] Enforcer implementations relevant to the GraphQL API handling.
- Configuring Enforcer as per the GraphQL schema definition.
- Scope validation
- Query processing support
-
[x] Integration test cases to cover the GraphQL API support feature.
- Query operation test case
- Nested query test case
- Query operation with name test case
- Mutation operation test case
- Mutation operation with name test case
- Query depth analysis test case
- Query complexity analysis test case
- Query analysis test case for success scenario
- Invocation with invalid token test case
- API level throttling test case
- API level throttling with IP condition test case
- API level throttling with header condition test case
- API level throttling with JWT claim condition test case
- Resource level throttling for multiple operations
- API invocation for JWT app test case
- API invocation for OAuth app test case
- API invocation for scope validation test case
- Multiple operations considering different scopes test case
- Multiple operations with different scopes and with an invalid JWT test case
- API invocation for invalid scope test case
- Operation level disabled security test case
- Operation level secured and disabled security invocation test case
- CORS test case for preflight requests
- APICTL based GraphQL API invocation
- GraphQL API invocation using internal keys
- GraphQL API invocation using API keys