Skip to content

Update error template to fix Codesandbox issues #119

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

Merged
merged 2 commits into from
Aug 2, 2022

Conversation

MrDoomBringer
Copy link
Contributor

@MrDoomBringer MrDoomBringer commented Jul 29, 2022

Per these issues: apollographql/apollo-client#9846 and apollographql/apollo-client#9659, it looks like graphql version 16 doesn't work on Codesandbox. This PR updates the package.json and dependabot config to keep it on version 15.6.1 until this is resolved.

Furthermore, this manually sets index.jsx as the default entrypoint, as it looks like create-react-app no longer automatically looks at .jsx files for entrypoints.

Codesandbox for this PR: https://codesandbox.io/s/react-apollo-error-template-mdbfix-vtfnw4

PS: Also this splits the Link and Schema definition into their own files, as having everything in one long chunk seemed against the sensibilities of both ESLint and myself. LMK if I should revert this change.

@MrDoomBringer
Copy link
Contributor Author

CC @hwillson @alessbell

@MrDoomBringer MrDoomBringer linked an issue Jul 29, 2022 that may be closed by this pull request
@@ -3,9 +3,10 @@
"name": "apollo-client-error-template",
"version": "1.0.0",
"license": "MIT",
"main": "src/index.jsx",
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be set for codesandbox?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep! That or renaming index.jsx to index.js, which feels wrong because it has jsx elements

Copy link
Contributor

@alessbell alessbell left a comment

Choose a reason for hiding this comment

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

👍

@MrDoomBringer MrDoomBringer self-assigned this Aug 2, 2022
Copy link
Member

@hwillson hwillson left a comment

Choose a reason for hiding this comment

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

Awesome - thanks @MrDoomBringer!

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.

CodeSandbox error
3 participants