Skip to content

Commit 1651039

Browse files
committed
no more flow weak
1 parent 7419af2 commit 1651039

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/type/definition.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,9 @@ type GraphQLInterfacesThunk = () => Array<GraphQLInterfaceType>;
468468
type GraphQLFieldConfigMapThunk = () => GraphQLFieldConfigMap;
469469

470470
export type GraphQLFieldResolveFn = (
471-
source?: mixed,
472-
args?: {[argName: string]: mixed},
473-
info?: GraphQLResolveInfo
471+
source: mixed,
472+
args: {[argName: string]: mixed},
473+
info: GraphQLResolveInfo
474474
) => mixed
475475

476476
export type GraphQLResolveInfo = {

src/type/introspection.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* @flow weak */
1+
/* @flow */
22
/**
33
* Copyright (c) 2015, Facebook, Inc.
44
* All rights reserved.
@@ -242,7 +242,7 @@ const __EnumValue = new GraphQLObjectType({
242242
'One possible value for a given Enum. Enum values are unique values, not ' +
243243
'a placeholder for a string or numeric value. However an Enum value is ' +
244244
'returned in a JSON response as a string.',
245-
fields: {
245+
fields: () => ({
246246
name: { type: new GraphQLNonNull(GraphQLString) },
247247
description: { type: GraphQLString },
248248
isDeprecated: {
@@ -252,7 +252,7 @@ const __EnumValue = new GraphQLObjectType({
252252
deprecationReason: {
253253
type: GraphQLString,
254254
}
255-
}
255+
})
256256
});
257257

258258
export const TypeKind = {
@@ -332,7 +332,8 @@ export const TypeMetaFieldDef: GraphQLFieldDefinition = {
332332
args: [
333333
{ name: 'name', type: new GraphQLNonNull(GraphQLString) }
334334
],
335-
resolve: (source, { name }, { schema }) => schema.getType(name)
335+
resolve: (source, { name }: { name: string }, { schema }) =>
336+
schema.getType(name)
336337
};
337338

338339
export const TypeNameMetaFieldDef: GraphQLFieldDefinition = {

0 commit comments

Comments
 (0)