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

(core) - Refactor Client to hide some impl details and reduce size #1638

Merged
merged 7 commits into from
May 13, 2021

Conversation

kitten
Copy link
Member

@kitten kitten commented May 12, 2021

  • Create an interface Client type with all internals hidden
  • Convert Client to an ES5 factory/constructor pattern
  • Ensure that Client can both be called with or without new (types remain the same)
  • Hide internals in factory function using scoped closure variables as needed

3.68kB minzipped to 3.59kB minzipped

@changeset-bot
Copy link

changeset-bot bot commented May 12, 2021

🦋 Changeset detected

Latest commit: ab0a0ac

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@urql/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

kitten added 4 commits May 12, 2021 13:36
I decided against creating the constructor in the Client function's
prototype since we really don't need to go that far for a simple
object factory, since no one should have relied on this specifically.
@kitten kitten marked this pull request as ready for review May 12, 2021 15:23
@kitten kitten merged commit a6be344 into main May 13, 2021
@kitten kitten deleted the refactor/client-execution branch May 13, 2021 10:26
@urql-ci urql-ci mentioned this pull request May 13, 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.

2 participants