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

[graphql-resolvers] Fix argument types #44919

Merged
merged 3 commits into from
May 21, 2020

Conversation

zaguiini
Copy link
Contributor

@zaguiini zaguiini commented May 20, 2020

Fixes lucasconstantino/graphql-resolvers#19.

  • Use a meaningful title for the pull request. Include the name of the package modified.

  • Test the change in your own code. (Compile and run.)

  • Add or edit tests to reflect the change. (Run with npm test.)

  • Follow the advice from the readme.

  • Avoid common mistakes.

  • Run npm run lint package-name (or tsc if no tslint.json is present).

  • Provide a URL to documentation or source code which provides context for the suggested changes: https://github.com/prisma-labs/graphql-middleware/pull/29/files

  • (n/a) If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.

  • Include tests for your changes

  • (n/a) If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.

@typescript-bot
Copy link
Contributor

typescript-bot commented May 20, 2020

@zaguiini Thank you for submitting this PR!

This PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Have you considered adding tests to cover the change you're making? Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you.

Code Reviews

This PR can be merged once it's reviewed by a DT maintainer.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ❌ Only a DT maintainer can merge changes without tests

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 44919,
  "author": "zaguiini",
  "owners": [
    "mike-engel",
    "aecorredor"
  ],
  "dangerLevel": "ScopedAndUntested",
  "headCommitAbbrOid": "066925e",
  "headCommitOid": "066925ef973168bae5e11553579d206522e80479",
  "mergeIsRequested": false,
  "stalenessInDays": 1,
  "lastCommitDate": "2020-05-20T13:24:49.000Z",
  "lastCommentDate": "2020-05-20T13:19:58.000Z",
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44919/files",
  "hasMergeConflict": false,
  "authorIsOwner": false,
  "isFirstContribution": false,
  "popularityLevel": "Well-liked by everyone",
  "anyPackageIsNew": false,
  "packages": [
    "graphql-resolvers"
  ],
  "files": [
    {
      "filePath": "types/graphql-resolvers/index.d.ts",
      "kind": "definition",
      "package": "graphql-resolvers"
    }
  ],
  "hasDismissedReview": false,
  "travisResult": "pass",
  "lastReviewDate": "2020-05-21T18:19:49.000Z",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 2,
  "isChangesRequested": false
}

@typescript-bot
Copy link
Contributor

🔔 @mike-engel @aecorredor - please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@danger-public
Copy link

danger-public commented May 20, 2020

Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files.
The check for missing properties isn't always right, so take this list as advice, not a requirement.

graphql-resolvers (unpkg)

was missing the following properties:

  1. all
  2. pipe
  3. combine

Generated by 🚫 dangerJS against 066925e

@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board May 20, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board May 20, 2020
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board May 20, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board May 20, 2020
@typescript-bot
Copy link
Contributor

👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.

Let’s review the numbers, shall we?

Comparison details 📊
master #44919 diff
Batch compilation
Memory usage (MiB) 40.4 37.9 -6.1%
Type count 4207 4214 0%
Assignability cache size 378 378 0%
Language service
Samples taken 30 30 0%
Identifiers in tests 30 30 0%
getCompletionsAtPosition
    Mean duration (ms) 66.3 148.1 +123.2%
    Mean CV 21.8% 22.1%
    Worst duration (ms) 80.9 191.0 +136.1%
    Worst identifier combineResolvers resolverOne
getQuickInfoAtPosition
    Mean duration (ms) 65.3 144.5 +121.3%
    Mean CV 23.5% 20.2% -14.0%
    Worst duration (ms) 77.3 180.0 +133.0%
    Worst identifier isDependee combined

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. and removed The Travis CI build failed labels May 20, 2020
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board May 20, 2020
@typescript-bot
Copy link
Contributor

Updated numbers for you here from 26681b4.

Comparison details 📊
master #44919 diff
Batch compilation
Memory usage (MiB) 38.0 41.0 +7.9%
Type count 4207 4214 0%
Assignability cache size 378 378 0%
Language service
Samples taken 30 30 0%
Identifiers in tests 30 30 0%
getCompletionsAtPosition
    Mean duration (ms) 84.9 182.5 +115.0% 🚨
    Mean CV 22.5% 22.1%
    Worst duration (ms) 106.1 222.2 +109.5% 🚨
    Worst identifier resolverOne combineResolvers
getQuickInfoAtPosition
    Mean duration (ms) 81.5 184.5 +126.4% 🚨
    Mean CV 20.8% 18.5% -11.3%
    Worst duration (ms) 97.9 229.1 +134.1% 🚨
    Worst identifier skip skip

It looks like there are several metrics that changed quite a bit. You might want to take a look and make sure your changes won’t cause slow-downs for users consuming these types.

@typescript-bot typescript-bot added Perf: Worse typescript-bot determined that this PR has a negative impact on compilation performance. and removed Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. labels May 20, 2020
@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label May 21, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board May 21, 2020
@sheetalkamat sheetalkamat merged commit c88c57d into DefinitelyTyped:master May 21, 2020
@typescript-bot typescript-bot removed this from Needs Maintainer Review in New Pull Request Status Board May 21, 2020
@typescript-bot
Copy link
Contributor

I just published @types/[email protected] to npm.

jjballano-qatium pushed a commit to jjballano-qatium/DefinitelyTyped that referenced this pull request Jun 16, 2020
ngbrown pushed a commit to ngbrown-forks/DefinitelyTyped that referenced this pull request Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Owner Approved A listed owner of this package signed off on the pull request. Perf: Worse typescript-bot determined that this PR has a negative impact on compilation performance.
Projects
None yet
6 participants