Update Application_K_Govind_API_Support.md with graphql

This commit is contained in:
K GOVIND
2025-04-01 15:30:28 +05:30
committed by GitHub
parent d47cdb6a1f
commit 648a78089c

View File

@ -40,7 +40,7 @@
- **Repo/Link:** [Link to Project]
### Motivating Challenges
- I like challenges of two kind, one which demands me to think and implement what i learned. And the other one is which makes me learn new things.
- I like challenges of two kind, one which demands me to think and implement what i learned. And the other one which makes me learn new things.
### Availability for GSoC
- **Will you work full-time on GSoC?** No
@ -60,12 +60,12 @@
### API Testing Support
I would like to intoroduce some feautures as listed above to enhance the api testing support of the application.
I would like to introduce some feautures as listed below to enhance the api testing support of the application. This is part of a single proposal.
### Abstract 1(Web Socket Implementation)
Introducing web socket implementation into the APIDash. Introduce a new client and manager to handle the websocket messages and render them in the ui .
The solution involves providing the users with an option to change ping intervals, number of reconnection attempts, interval between reconnection attenpts. All of this would be managed inside the settings. The ui updates would be made using river pod provider specifically for websocket messages for each request ids. All this would be initiated by user clicking on the new APIType (Web Scoket). The appropriate changes would be done in codegen related files to give code.
The solution involves providing the users with an option to change ping intervals, number of reconnection attempts, interval between reconnection attenpts. All of this would be managed inside the settings. The ui updates would be made using river pod provider specifically for websocket messages for each request ids. All this would be initiated by user clicking on the new APIType (Web Socket). The appropriate changes would be done in codegen related files to give code.
```
+-------------------------+
@ -110,23 +110,120 @@ The solution involves providing the users with an option to change ping interval
+--------------------------------+
```
### Detailed Description
- **Technologies & Tools:** The approach uses the package web_socket_channel(^3.0.1)
- **Expected Outcomes:** A clean ui with maximum smoothness satisfying above mentioned solutions.
- **Linked PR for POC:** https://github.com/foss42/apidash/pull/555 (The PR is in no way the final product but simply to show the code structure and my approach)
### Abstract 2(SSE Support)
Trying to implement SSE Support into the application. The approach is still similar to
Trying to implement SSE Support into the application. The approach is similar to web_sockets in many ways.
### Abstract 3(GraphQL Enhancement)
Proposing to include graph ql variable support and graphql introspection
Proposing to include graphql variable support and graphql introspection .
Graphql variable :- Make a json editor pane as an additional tab in request pane for graphql with enviornment support. And then parse it along the body of request. The approach was verified in custom endpoint and in https://rickandmortyapi.com/graphql . A partial implementation of this was done in https://github.com/foss42/apidash/pull/588 with a mistake in ui approach which would be rectified.
GraphQL Introspection :- The approach is to use a prebuild introspection query that asks for all the contents necessary that developer would want to know and display the results in GraphQL SDL (Schema Definition Language) . The introspection query asks for all schema details mutation ,subscription, query schema types , directives . Later on we iterate through the received json making the GRAPHQL SDL.
The introspection query would be:
```
{
__schema {
queryType {
name
fields {
name
description
args {
name
description
type {
name
kind
}
}
type {
name
kind
}
}
}
mutationType {
name
fields {
name
description
args {
name
description
type {
name
kind
}
}
type {
name
kind
}
}
}
subscriptionType {
name
fields {
name
description
args {
name
description
type {
name
kind
}
}
type {
name
kind
}
}
}
types {
name
kind
description
fields {
name
description
type {
name
kind
}
}
}
directives {
name
description
locations
args {
name
description
type {
name
kind
}
}
}
}
}
```
Afterwards if possible i would like to make a package similar to json explorer to render the ui with collapse and expand feauture . This would require some time as SDL is quite different from the standard JSON.
### Abstract 4(URL Encoded Multipart nd File Support)
### Abstract 4(URL Encoded Multipart)