Skip to content

Commit

Permalink
Type field arg values as "any"
Browse files Browse the repository at this point in the history
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
  • Loading branch information
leebyron committed Nov 15, 2016
1 parent 7eae7aa commit 9f06828
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/type/definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ export type GraphQLIsTypeOfFn<TSource, TContext> = (

export type GraphQLFieldResolver<TSource, TContext> = (
source: TSource,
args: {[argName: string]: mixed},
args: { [argName: string]: any },
context: TContext,
info: GraphQLResolveInfo
) => mixed;
Expand Down
2 changes: 1 addition & 1 deletion src/type/introspection.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ export const TypeMetaFieldDef: GraphQLField<*, *> = {
{ name: 'name', type: new GraphQLNonNull(GraphQLString) }
],
resolve: (source, { name }, context, { schema }) =>
schema.getType(((name: any): string))
schema.getType(name)
};

export const TypeNameMetaFieldDef: GraphQLField<*, *> = {
Expand Down

0 comments on commit 9f06828

Please sign in to comment.