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

Sync TypeScript types with Flow types #280

Merged
merged 1 commit into from
Jul 11, 2020

Conversation

danielrearden
Copy link
Collaborator

No description provided.

object: T,
): ConnectionCursor;
): ConnectionCursor | null | undefined;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -78,5 +79,5 @@ export function cursorForObjectInConnection<T>(
*/
export function getOffsetWithDefault(
cursor?: ConnectionCursor | null,
defaultOffset?: number | null,
defaultOffset: number,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@codecov
Copy link

codecov bot commented Jul 11, 2020

Codecov Report

Merging #280 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #280   +/-   ##
=======================================
  Coverage   99.49%   99.49%           
=======================================
  Files          19       19           
  Lines         595      595           
  Branches       38       38           
=======================================
  Hits          592      592           
  Misses          3        3           
Impacted Files Coverage Δ
src/connection/arrayconnection.js 100.00% <ø> (ø)
src/connection/connection.js 100.00% <ø> (ø)
src/mutation/mutation.js 100.00% <ø> (ø)
src/node/node.js 100.00% <ø> (ø)
src/node/plural.js 88.88% <ø> (ø)

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 3bd6838...ae09b87. Read the comment docs.

export interface ConnectionConfig {
name?: string | null;
nodeType: ConnectionConfigNodeType;
nodeType: GraphQLObjectType;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -6,12 +6,14 @@ import type {
Thunk,
} from 'graphql';

export type mutationFn = (
// TS_SPECIFIC: This type is only exported by TypeScript
export type MutationFn = (
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Rename to match Flow type and TS naming conventions

@@ -4,10 +4,11 @@ import type {
GraphQLTypeResolver,
} from 'graphql';

export interface GraphQLNodeDefinitions {
// TS_SPECIFIC: This type is only exported by TypeScript
export interface GraphQLNodeDefinitions<TContext> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -22,9 +23,10 @@ export interface GraphQLNodeDefinitions {
*/
export function nodeDefinitions<TContext>(
idFetcher: (id: string, context: TContext, info: GraphQLResolveInfo) => any,
typeResolver?: GraphQLTypeResolver<any, TContext>,
): GraphQLNodeDefinitions;
typeResolver?: GraphQLTypeResolver<any, TContext> | null,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -49,6 +51,6 @@ export function fromGlobalId(globalId: string): ResolvedGlobalId;
* property on the object.
*/
export function globalIdField(
typeName?: string,
typeName?: string | null,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

export interface PluralIdentifyingRootFieldConfig {
argName: string;
inputType: GraphQLInputType;
outputType: GraphQLOutputType;
resolveSingleInput(input: any, context: any, info: GraphQLResolveInfo): any;
description?: string;
resolveSingleInput: (
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

lint fix

src/node/plural.d.ts Outdated Show resolved Hide resolved
@IvanGoncharov IvanGoncharov added the PR: bug fix 🐞 requires increase of "patch" version number label Jul 11, 2020
@IvanGoncharov IvanGoncharov merged commit eb2d9e9 into graphql:master Jul 11, 2020
@danielrearden danielrearden deleted the sync-with-flow branch July 11, 2020 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: bug fix 🐞 requires increase of "patch" version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants