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

alternative refactor #3660

Closed
wants to merge 10 commits into from
Closed

alternative refactor #3660

wants to merge 10 commits into from

Conversation

yaacovCR
Copy link
Contributor

@yaacovCR yaacovCR commented Jun 24, 2022

This is an experimental alternative refactor to #3658

depends on #3644, will possibly be integrated into it

WIP

yaacovCR added 5 commits June 24, 2022 12:09
The `execute`/`executeImpl` and `createSourceEventStream`/`createSourceEventStreamImpl` functions follow the same basic pattern of building the contet and using it to run a function. This PR extracts that pattern into a separate function.

For good measure, the same pattern in applied to the soon-to-be-deprecated `subscribe` function.

Hheavier refactoring is on the way from @IvanGoncharov (see graphql#3639 (review)), but in the meantime, this consolidates the common pattern without any breaking changes.
...to executeSubscriptionRootField => because that's what it does!
...because that's what it does!

The execution of an operation returns a map of data/errors, not just the data.
`execute` no longer runs the query algorithm for subscription operations. Rather, subscription operations are performed, as per the spec. `subscribe` is deprecated.
to replace the old exported functionality from execute
@netlify
Copy link

netlify bot commented Jun 24, 2022

Deploy Preview for compassionate-pike-271cb3 failed.

Name Link
🔨 Latest commit 87f1703
🔍 Latest deploy log https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/62b5d2a9883c7700083e8067

@github-actions
Copy link

Hi @yaacovCR, I'm @github-actions bot happy to help you with this PR 👋

Supported commands

Please post this commands in separate comments and only one per comment:

  • @github-actions run-benchmark - Run benchmark comparing base and merge commits for this PR
  • @github-actions publish-pr-on-npm - Build package from this PR and publish it on NPM

@yaacovCR yaacovCR force-pushed the refactor branch 2 times, most recently from ca246fd to ce77974 Compare June 24, 2022 11:03
@yaacovCR yaacovCR closed this Jun 28, 2022
@yaacovCR yaacovCR deleted the refactor branch June 28, 2022 15:37
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.

1 participant