-
-
Notifications
You must be signed in to change notification settings - Fork 536
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
Document how to render a custom graphql IDE #3664
Document how to render a custom graphql IDE #3664
Conversation
Reviewer's Guide by SourceryThis pull request adds documentation on how to render a custom GraphQL IDE across various integrations. It introduces a new Class diagram for the new render_graphql_ide methodclassDiagram
class GraphQLView {
+HttpResponse render_graphql_ide(HttpRequest request)
}
class AsyncGraphQLView {
+HttpResponse render_graphql_ide(HttpRequest request)
}
class GraphQLController {
+Response render_graphql_ide(Request request)
}
class MyGraphQLView {
+HttpResponse render_graphql_ide(HttpRequest request)
}
class MyGraphQLController {
+Response render_graphql_ide(Request request)
}
class MyGraphQLHTTPConsumer {
+ChannelsResponse render_graphql_ide(ChannelsRequest request)
}
class MyGraphQLRouter {
+HTMLResponse render_graphql_ide(Request request)
}
class MyGraphQL {
+Response render_graphql_ide(Request request)
}
class MyGraphQLView~Flask~ {
+Response render_graphql_ide(Request request)
}
class MyGraphQLView~Sanic~ {
+HTTPResponse render_graphql_ide(Request request)
}
class MyGraphQLView~Aiohttp~ {
+web.Response render_graphql_ide(web.Request request)
}
class MyGraphQLView~Chalice~ {
+Response render_graphql_ide(Request request)
}
class MyGraphQLView~Quart~ {
+Response render_graphql_ide(Request request)
}
class MyGraphQLView~Django~ {
+HttpResponse render_graphql_ide(HttpRequest request)
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @DoctorJohn - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟡 Documentation: 1 issue found
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
async def render_graphql_ide(self, request: Request) -> Response: | ||
custom_html = """<html><body><h1>Custom GraphQL IDE</h1></body></html>""" | ||
|
||
return Response(self.graphql_ide_html) |
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.
issue (documentation): Incorrect variable used in Quart integration example
The example uses self.graphql_ide_html
instead of the custom_html
variable defined earlier in the function.
Hi, thanks for contributing to Strawberry 🍓! We noticed that this PR is missing a So as soon as this PR is merged, a release will be made 🚀. Here's an example of Release type: patch
Description of the changes, ideally with some examples, if adding a new feature. Release type can be one of patch, minor or major. We use semver, so make sure to pick the appropriate type. If in doubt feel free to ask :) Here's the tweet text:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3664 +/- ##
==========================================
+ Coverage 96.66% 96.93% +0.26%
==========================================
Files 504 504
Lines 33448 33448
Branches 5600 5600
==========================================
+ Hits 32333 32423 +90
+ Misses 881 793 -88
+ Partials 234 232 -2 |
CodSpeed Performance ReportMerging #3664 will not alter performanceComparing Summary
|
Description
This PR adds integration-specific guides on rendering a custom GraphQL IDE in case our
graphql_ide
option is too basic.(This PR also fixes one related type in the ASGI view that was too broad.)
Types of Changes
Issues Fixed or Closed by This PR
Summary by Sourcery
Enhance the GraphQL integration by allowing customization of the GraphQL IDE rendering and update the documentation to guide users on implementing this feature across multiple frameworks.
Enhancements:
render_graphql_ide
method for more control over the rendering of the GraphQL IDE across various integrations.Documentation: