Skip to content

Commit 9f06828

Browse files
committed
Type field arg values as "any"
This changes the flow types from an object of mixed values to an object of any values. This is explicitly less type safe, however is way more ergonomic and better matches the previous behavior before flow types were exported. This was suggested in #554 and partially implements #574
1 parent 7eae7aa commit 9f06828

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/type/definition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ export type GraphQLIsTypeOfFn<TSource, TContext> = (
529529

530530
export type GraphQLFieldResolver<TSource, TContext> = (
531531
source: TSource,
532-
args: {[argName: string]: mixed},
532+
args: { [argName: string]: any },
533533
context: TContext,
534534
info: GraphQLResolveInfo
535535
) => mixed;

src/type/introspection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ export const TypeMetaFieldDef: GraphQLField<*, *> = {
434434
{ name: 'name', type: new GraphQLNonNull(GraphQLString) }
435435
],
436436
resolve: (source, { name }, context, { schema }) =>
437-
schema.getType(((name: any): string))
437+
schema.getType(name)
438438
};
439439

440440
export const TypeNameMetaFieldDef: GraphQLField<*, *> = {

0 commit comments

Comments
 (0)