-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Consider decoupling CRA 2.0 from graphql-tag version #4893
Comments
cc @petetnt |
Adding 2.0.0 milestone as this decision should probably happen before the final release. |
Hey! While not directly supported by CRA, overriding the resolutions in I haven't had much experience with That said I'd love to see optimal solution for this, what would be the optimal way forward? 👍 |
Relevant: #4590 (comment) I think the loader approach fits the CRA philosophy quite well: if the version doesn't fit, you can always eject but then you are on your own (which is totally fine, as it says in the box). I also think that The loader was vocally wanted in the past and people are pretty into it, but the caveats you've mentioned (coupling As Relay works too via the |
Is there something similar to |
https://github.com/leoasis/graphql-tag.macro should offer similar functionality. |
Was the general consensus here that we revert #3909? |
#3909 added support for importing
*.graphql
files. This is only useful for GraphQL libraries that want to consume the AST from thegraphql
package at the particular version bundled with CRA. This ties the upgrade of graphql and CRA together which seems limiting.Relay (which doesn't import GraphQL, but instead uses inline GraphQL) solves this in the next version by supporting
babel-plugin-macros
which will look similar to:I'm not sure if loaders could be made 'injectable' in some way, but decoupling the projects might make upgrades easier going forward.
I want to add that keeping
*.graphql
require support specific to Apollo doesn't get in the way of Relay's solution.The text was updated successfully, but these errors were encountered: