-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Rename graphql
export to g
#9460
Conversation
Updated dependencies detected. Learn more about Socket for GitHub ↗︎
|
.changeset/lemon-oranges-promise.md
Outdated
"@keystone-6/auth": major | ||
--- | ||
|
||
Use `g` export instead of `graphql` from `@keystone-6/core`. The only breakage is that you must be on the version of `@keystone-6/core` that includes the `g` export or newer |
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.
Note that this changeset has major changes but the @keystone-6/core
changeset is only a minor since it's not breaking to add the new name and keep the old one around but using the new name is breaking since people must update @keystone-6/core
otherwise these packages will not work. While this would be easily avoidable by using the old version, I don't think that complexity is worth it since people will already be forced to use all the new versions together because of the changes for @keystar/ui
.
70362c0
to
f9dcf5c
Compare
// preserve the updates you made to the usages of `graphql` | ||
// ||||||| | ||
// vvvvvvv | ||
export import graphql = _graphql |
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.
If you're curious why I'm using this weird syntax, see the latter part of the PR description of Thinkmill/graphql-ts#19
f9dcf5c
to
5f4caa2
Compare
5f4caa2
to
c08e05f
Compare
3572f25
to
4422deb
Compare
4422deb
to
ed6c96b
Compare
This renames the
graphql
export tog
for two reasons:graphql
from libraries such as Relay, GraphQL Code Generator and gql.tada that use the variable namegraphql
to declare GraphQL operationsThe
graphql
export still exists but is now deprecated and may be removed in a future release.To quickly update usages of the
graphql
export in your project to useg
:node_modules/@keystone-6/core/dist/declarations/src/types/schema/legacy-alias.d.ts
in your editor ("Go to Definition" will not take you to the correct file)graphql
tog
, this will update usages ofgraphql
tog
g
tographql
(avoid using "Rename Symbol" again because you want to preserve the updates you made in step 2)graphql
export tog
Thinkmill/graphql-ts#19