-
Notifications
You must be signed in to change notification settings - Fork 57
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
Prefer buildClientSchema to buildSchema #176
Conversation
49a9f31
to
e0c7e0a
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.
🚢
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! Thanks for grabbing this Keyfer!
function report(node) { | ||
context.report({ | ||
node, | ||
message: `Prefer buildClientSchema to buildSchema`, |
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 wonder if we could even apply the fix here?
https://eslint.org/docs/developer-guide/working-with-rules#applying-fixes-1
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 was thinking about this, but due to not knowing how buildSchema
could be used, and the differences in implementation, applying a standardized fix across x
number of repos, with x
implementations could get weird.
Looks like new Rails apps generated with |
Added a new rule,
@shopify/typescript/prefer-build-client-schema
, which flags uses ofbuildSchema
and recommends usingbuildClientSchema
instead due to our findings in performance.For more information on the performance findings, check here.