Skip to content

Conversation

cryingraven
Copy link
Contributor

@cryingraven cryingraven commented Sep 11, 2025

this fixes the error when activating graphql playground and opening it in the browser. the page is blank.

"${JSON.stringify(this.config.graphQLPath)}" the result -> ""/graphql""
by removing the double quotes
${JSON.stringify(this.config.graphQLPath)} the result -> "/graphql"

and the problem fixed

Summary by CodeRabbit

  • Bug Fixes
    • Fixed initialization of the GraphQL embedded sandbox to correctly set the endpoint and headers, preventing escaped/invalid values.
    • Ensures request headers (including authentication) are applied as intended, improving connectivity and reliability in the in-browser GraphQL console.
  • Notes
    • No changes to server-side behavior or public APIs.

Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title fix: unexpected string on graphql playground page fix: Unexpected string on graphql playground page Sep 11, 2025
Copy link

parse-github-assistant bot commented Sep 11, 2025

🚀 Thanks for opening this pull request!

Copy link

coderabbitai bot commented Sep 11, 2025

📝 Walkthrough

Walkthrough

Adjusts how JSON-stringified values are embedded in the generated client-side sandbox code within ParseGraphQLServer.js, removing extra quoting so the EmbeddedSandbox receives plain string values for initialEndpoint and specific headers. No server-side logic or public APIs are changed.

Changes

Cohort / File(s) Summary of changes
Sandbox value embedding
src/GraphQL/ParseGraphQLServer.js
Inlines JSON.stringify results directly (without wrapping quotes) for EmbeddedSandbox initialEndpoint and headers (X-Parse-Application-Id, X-Parse-Master-Key), correcting string literal handling in generated JS. No exported/public API changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks (2 passed, 1 warning)

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The current description explains the root cause and the fix (removing surrounding quotes) but does not follow the repository's required PR template: it lacks the "Closes" issue line, the explicit "Approach" section summarizing the change and affected files, and the Tasks checklist. Because those required template sections are missing, the description is incomplete relative to the repository's expectations. Update the PR description to use the repository template exactly: add a "Closes:" line linking the related issue (URL or issue number), fill the "Approach" section with a concise summary of what changed (e.g., which file(s) were modified and that JSON.stringify was inlined to remove extra quotes), and complete the "Tasks" checklist (tests, docs, security checks as applicable). Keep the existing reproduction and fix details in the "Approach" or an appropriate section so reviewers can verify the change.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "fix: Unexpected string on graphql playground page" concisely and accurately summarizes the primary change — a bugfix addressing an unexpected quoted string that broke the GraphQL Playground page — and is specific enough for a reviewer to understand the main purpose of the PR. It is short, on-topic, and avoids unnecessary noise.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The current description explains the root cause and the fix (removing surrounding quotes) but does not follow the repository's required PR template: it lacks the "Closes" issue line, the explicit "Approach" section summarizing the change and affected files, and the Tasks checklist. Because those required template sections are missing, the description is incomplete relative to the repository's expectations. Update the PR description to use the repository template exactly: add a "Closes:" line linking the related issue (URL or issue number), fill the "Approach" section with a concise summary of what changed (e.g., which file(s) were modified and that JSON.stringify was inlined to remove extra quotes), and complete the "Tasks" checklist (tests, docs, security checks as applicable). Keep the existing reproduction and fix details in the "Approach" or an appropriate section so reviewers can verify the change.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title "fix: GraphQL playground shows blank page" succinctly summarizes the primary user-facing issue addressed by the changeset and matches the PR objectives and raw_summary describing an interpolation error that produced extra quotes and a blank playground. It is concise, specific, and directly related to the main change. This makes it appropriate for a teammate scanning the commit history.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@parseplatformorg
Copy link
Contributor

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 82fdb0d and 2cc3d73.

📒 Files selected for processing (1)
  • src/GraphQL/ParseGraphQLServer.js (1 hunks)
🔇 Additional comments (1)
src/GraphQL/ParseGraphQLServer.js (1)

170-170: Correct fix for double-quoting; resolves the blank page.

Inlining JSON.stringify without surrounding quotes is the right approach here.

Copy link
Member

@Moumouls Moumouls left a comment

Choose a reason for hiding this comment

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

You are absolutely right, I have this change on my fork, and it seems I forgot to open a PR to parse-server

@Moumouls
Copy link
Member

@cryingraven just a reminder that playground path should only be used in dev/local, not in production (because it expose the master key)

@Moumouls
Copy link
Member

@mtrezza we should merge this asap

@Moumouls
Copy link
Member

close: #9057

@mtrezza
Copy link
Member

mtrezza commented Sep 19, 2025

Started CI

Copy link

codecov bot commented Sep 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.99%. Comparing base (82fdb0d) to head (2cc3d73).
⚠️ Report is 6 commits behind head on alpha.

Additional details and impacted files
@@           Coverage Diff           @@
##            alpha    #9858   +/-   ##
=======================================
  Coverage   92.99%   92.99%           
=======================================
  Files         187      187           
  Lines       15096    15096           
  Branches      174      174           
=======================================
  Hits        14039    14039           
  Misses       1045     1045           
  Partials       12       12           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Moumouls
Copy link
Member

a flaky here @mtrezza i think it's ready to merge !

@mtrezza mtrezza changed the title fix: Unexpected string on graphql playground page fix: GraphQL playground shows blank page Sep 21, 2025
@mtrezza mtrezza merged commit 7b5395c into parse-community:alpha Sep 21, 2025
24 of 25 checks passed
parseplatformorg pushed a commit that referenced this pull request Sep 21, 2025
## [8.2.5-alpha.1](8.2.4...8.2.5-alpha.1) (2025-09-21)

### Bug Fixes

* GraphQL playground shows blank page ([#9858](#9858)) ([7b5395c](7b5395c))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 8.2.5-alpha.1

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Sep 21, 2025
parseplatformorg pushed a commit that referenced this pull request Oct 2, 2025
## [8.2.5](8.2.4...8.2.5) (2025-10-02)

### Bug Fixes

* GraphQL playground shows blank page ([#9858](#9858)) ([7b5395c](7b5395c))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 8.2.5

@parseplatformorg parseplatformorg added the state:released Released as stable version label Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants