Skip to content
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

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

rymnc
Copy link
Member

@rymnc rymnc commented Nov 21, 2024

Linked Issues/PRs

  • none

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

image

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

After merging, notify other teams

[Add or remove entries as needed]

@rymnc rymnc force-pushed the test/add-changes-to-graphql branch from 7eb4acf to d6ed8de Compare November 21, 2024 09:13
@rymnc rymnc force-pushed the test/add-changes-to-graphql branch from d6ed8de to cc4f659 Compare November 21, 2024 09:14
@rymnc rymnc requested a review from a team November 21, 2024 09:33
@rymnc rymnc self-assigned this Nov 21, 2024
@@ -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)]
Copy link
Member Author

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

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@netrome netrome left a 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.

@rymnc rymnc requested a review from netrome November 21, 2024 10:04
@rymnc rymnc added the breaking A breaking api change label Nov 21, 2024
@rymnc rymnc requested a review from Copilot November 21, 2024 10:13
Copy link
Contributor

@netrome netrome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating! 🙏

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.

Copy link
Contributor

@AurelienFT AurelienFT left a 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))
Copy link
Collaborator

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=)

Copy link
Contributor

@AurelienFT AurelienFT Nov 21, 2024

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.

Copy link
Collaborator

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.

Copy link
Member Author

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

Copy link
Contributor

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.

Copy link
Contributor

@AurelienFT AurelienFT Nov 22, 2024

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.

@rymnc rymnc merged commit 896e4cf into master Nov 25, 2024
32 of 43 checks passed
@rymnc rymnc deleted the test/add-changes-to-graphql branch November 25, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A breaking api change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants