-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Graph QL Support #244
Conversation
Screen.Recording.2024-03-03.at.2.17.04.AM.mov@ashitaprasad @animator I've added graphql support this is the working video of the prototype there are many bugs yet to be fixed! |
|
||
enum RequestItemMenuOption { edit, delete, duplicate } | ||
|
||
enum HTTPVerb { get, head, post, put, patch, delete } | ||
enum HTTPVerb { get, head, post, put, patch, delete , graphql } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GraphQL operates over HTTP, it doesn’t map directly to HTTP verbs like a RESTful service does. GraphQL, on the other hand, is a query language and data manipulation language for APIs.
@@ -255,6 +256,7 @@ const kMethodsWithBody = [ | |||
HTTPVerb.put, | |||
HTTPVerb.patch, | |||
HTTPVerb.delete, | |||
HTTPVerb.graphql, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment that I left in the code above. Instead, you can define a ProtocolType
enumeration and include HTTP and GraphQL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A separate service file must be made for GraphQL instead of modifying this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for giving the info!
I was also wondering the same :)
I wanted to ask if the logic of implementation
String requestBody = '{"query": "${body!.replaceAll('\n', '')}"}';
is correct and the UI design is on the point
Is there's a suggestion on that I would love to work on it and solve the bugs :)
@BrawlerXull , The implementation looks good, but why did you put Such a HTTP method doesn't exist. It'd be better if you could put |
Yes! as mentioned earlier I was also thinking that adding it in HTTP method is incorrect 😄 Thanks for the review @opxdelwin @mmjsmohit |
1 design I thought was implementing a sperate page like Requests for GraphQL / We can add a button below Requests in the left top side of the application |
But wouldn't that take |
@BrawlerXull Please make this change #307 |
Handling GraphQL API is different from REST HTTP API and the current approach needs a lot of rework along with using graphQL helper packages. |
PR Description
Added GraphQL Support to the Application
Related Issues
Checklist
flutter test
) and all tests are passingAdded/updated tests?
We encourage you to add relevant test cases.