-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fix(graphql_playground): use graphiql instead #2446
Conversation
7eb4acf
to
d6ed8de
Compare
d6ed8de
to
cc4f659
Compare
@@ -31,7 +31,7 @@ pub struct GraphQLArgs { | |||
pub graphql_max_complexity: usize, | |||
|
|||
/// The max recursive depth of GraphQL queries. | |||
#[clap(long = "graphql-max-recursive-depth", default_value = "16", env)] | |||
#[clap(long = "graphql-max-recursive-depth", default_value = "24", env)] |
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.
16 is not sufficient for graphiql, needing this bump
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.
Nice stuff! Though I believe we should mark this as a breaking change.
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 updating! 🙏
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.
Copilot reviewed 5 out of 5 changed files in this pull request and generated no suggestions.
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.
I think depth is still limited by the query complexity elsewhere etc so that's fine.
|
||
let graphql_playground = | ||
|| render_graphql_playground(graphql_endpoint, graphql_subscription_endpoint); | ||
|
||
let router = Router::new() | ||
.route("/v1/playground", get(graphql_playground)) |
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.
We can support old endpoint under v1 and new under v2=)
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.
What's the point ? I think the new one has all the same features and it's just a playground no code depends on it.
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.
In this case this change will be non breaking and we don't need to update documentation plus people who used to use the old playground can continue to use it.
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.
the old playground has security issues too so I'm not sure we should keep it
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.
For me when you perform an update, you can except some UI changes as soon as it doesn't break any code I don't think anyone is doing scrapping on the graphql playground and I see no point of using the previous ones all features seems to exist on this one too.
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.
However, I don't want to block anything just "for this" so it's a deal breaker for you @xgreenx I'm ok to walk beside you on that.
Linked Issues/PRs
Description
The graphql-playground is well-outdated, with the last update being 2y ago. This PR switches it out for graphiql which is more recently maintained.
I did this because the tooltips don't dissapear on the playground with latest versions of chrome/arc due to a deprecated event handler on the DOM.
see graphql/graphql-playground#1429
Checklist
Before requesting review
After merging, notify other teams
[Add or remove entries as needed]