-
Notifications
You must be signed in to change notification settings - Fork 181
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
Conversation
object: T, | ||
): ConnectionCursor; | ||
): ConnectionCursor | null | undefined; |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report
@@ Coverage Diff @@
## master #280 +/- ##
=======================================
Coverage 99.49% 99.49%
=======================================
Files 19 19
Lines 595 595
Branches 38 38
=======================================
Hits 592 592
Misses 3 3
Continue to review full report at Codecov.
|
export interface ConnectionConfig { | ||
name?: string | null; | ||
nodeType: ConnectionConfigNodeType; | ||
nodeType: GraphQLObjectType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a11f54d
to
fbb7feb
Compare
@@ -6,12 +6,14 @@ import type { | |||
Thunk, | |||
} from 'graphql'; | |||
|
|||
export type mutationFn = ( | |||
// TS_SPECIFIC: This type is only exported by TypeScript | |||
export type MutationFn = ( |
There was a problem hiding this comment.
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> { |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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: ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lint fix
fbb7feb
to
ae09b87
Compare
No description provided.