Skip to content
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

Avoid using Object.assign to attach extra properties to gql. #380

Merged
merged 1 commit into from
Mar 18, 2021

Conversation

benjamn
Copy link
Member

@benjamn benjamn commented Mar 18, 2021

Should fix #373.

@benjamn benjamn self-assigned this Mar 18, 2021
@benjamn benjamn requested a review from hwillson March 18, 2021 17:52
@benjamn benjamn force-pushed the avoid-Object.assign branch from 25e0cc6 to 9a09ce6 Compare March 18, 2021 17:57
Comment on lines +161 to +171
export namespace gql {
export const {
gql,
resetCaches,
disableFragmentWarnings,
enableExperimentalFragmentVariables,
disableExperimentalFragmentVariables,
} = extras;
}

gql.default = gql;
Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunately, since default is a reserved word, there doesn't seem to be any way to export it from the namespace gql block above.

Choose a reason for hiding this comment

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

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.

Looks great @benjamn - thanks!

@benjamn benjamn merged commit 0ac664a into main Mar 18, 2021
@benjamn benjamn deleted the avoid-Object.assign branch March 18, 2021 19:54
benjamn added a commit that referenced this pull request Mar 18, 2021
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.

v2.12.0 and higher break support for IE11
3 participants