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

Allow CORS for checking if GraphiQL is running #3969

Merged
merged 2 commits into from
Jun 4, 2024
Merged

Conversation

thomfoolery
Copy link
Contributor

WHY are these changes introduced?

Shopify.dev wants to verify CLI's GraphiQL server is running so we can forward code examples from our LLM assistant.

CORS policies currently restrict us from pinging the GraphiQL server.

WHAT is this pull request doing?

This PR loosens the CORS policy for /graphiql/ping

How to test your changes?

  1. Run shopify app dev inside a Shopify app (with this code checked out)
  2. Open shopify.dev in a web browser
  3. Open the developer tools console and run fetch('http://localhost:3457/graphiql/ping').then(console.log)
  4. See a response object come back with ok === true

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

@thomfoolery thomfoolery requested a review from amcaplan June 3, 2024 18:00

This comment has been minimized.

@thomfoolery thomfoolery self-assigned this Jun 3, 2024
Copy link
Contributor

github-actions bot commented Jun 3, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
71.89% (-0.03% 🔻)
7236/10065
🟡 Branches 69.06% 3565/5162
🟡 Functions
71.54% (-0.03% 🔻)
1936/2706
🟡 Lines
73.16% (-0.03% 🔻)
6813/9313
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / server.ts
1.3% (-0.07% 🔻)
0% 0%
1.37% (-0.08% 🔻)

Test suite run success

1684 tests passing in 781 suites.

Report generated by 🧪jest coverage report action from 5f10367

@amcaplan amcaplan added this pull request to the merge queue Jun 4, 2024
Merged via the queue into main with commit 053d71b Jun 4, 2024
@amcaplan amcaplan deleted the allow-cors-graphiql branch June 4, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants