-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 new interface style for GraphQL. #4012
Conversation
try { | ||
return parse(source, { allowLegacySDLImplementsInterfaces: false }); | ||
} catch (_) { | ||
return parse(source, { allowLegacySDLImplementsInterfaces: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be great if we could detect which style the code was originally written so we could support both styles, and we can with this code.
But I don't think it's worth the trouble though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would agree with that.
Will users on older versions of GraphQL libraries be inconvenienced if prettier starts using the new style? As in, will their libraries not be able to parse the new |
Yes, I would consider this change a breaking change and consumers should be made aware. If you disagree and think that we should support it regardless, I would ask for your suggestions on how to do it since the AST provided does not include any notion of separator. |
We have to check the source ( |
This is a breaking change since it will upgrade the old style to the new one. Closes prettier#3600.
When in present of mixed style, it updates to the new one.
4b72949
to
356db5e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
Should I worry about the codecov/project check? |
Nah |
This is a breaking change since it will upgrade the old style to the new one.
Closes #3600.