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

move more reusable logic into toolkit package #2401

Conversation

thomasheyenbrock
Copy link
Collaborator

In particular we move over:

  • Async helper functions (promises, observables and async-iterables)
  • Formatting functions for result JSON and errors

I also noticed that the shouldPersistHeaders property that is part of the fetcher options is never used for anything, and after searching through issues and commit history I found no good reason why they should be in there. (@acao maybe I'm lacking context here?) This PR deprecates it and intends to remove it in the next major version of graphiql.

@changeset-bot
Copy link

changeset-bot bot commented May 12, 2022

🦋 Changeset detected

Latest commit: 80f772c

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

This PR includes changesets to release 2 packages
Name Type
graphiql Patch
@graphiql/toolkit 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

@codecov
Copy link

codecov bot commented May 12, 2022

Codecov Report

Merging #2401 (80f772c) into main (2d91916) will decrease coverage by 0.81%.
The diff coverage is 69.48%.

@@            Coverage Diff             @@
##             main    #2401      +/-   ##
==========================================
- Coverage   65.70%   64.89%   -0.82%     
==========================================
  Files          85       81       -4     
  Lines        5106     5278     +172     
  Branches     1631     1703      +72     
==========================================
+ Hits         3355     3425      +70     
- Misses       1747     1849     +102     
  Partials        4        4              
Impacted Files Coverage Δ
packages/codemirror-graphql/src/hint.ts 94.73% <ø> (ø)
packages/codemirror-graphql/src/lint.ts 100.00% <ø> (ø)
packages/codemirror-graphql/src/results/mode.ts 47.05% <ø> (ø)
...kages/codemirror-graphql/src/utils/forEachState.ts 100.00% <ø> (ø)
packages/codemirror-graphql/src/utils/hintList.ts 95.65% <ø> (ø)
...ackages/codemirror-graphql/src/utils/info-addon.ts 1.02% <ø> (ø)
...ckages/codemirror-graphql/src/utils/mode-indent.ts 0.00% <0.00%> (ø)
packages/codemirror-graphql/src/variables/hint.ts 89.70% <ø> (ø)
packages/codemirror-graphql/src/variables/mode.ts 79.48% <ø> (ø)
.../graphiql/src/components/DocExplorer/Directive.tsx 100.00% <ø> (ø)
... and 83 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb39d02...80f772c. Read the comment docs.

@thomasheyenbrock thomasheyenbrock merged commit 60a744b into graphql:main May 13, 2022
@thomasheyenbrock thomasheyenbrock deleted the refactor/async-helpers-to-toolkit branch May 13, 2022 08:25
@acao acao mentioned this pull request May 13, 2022
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