Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions src/type/definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ export type GraphQLField<
TSource,
TContext,
TArgs = { [argument: string]: any, ... },
> = {
> = {|
name: string,
description: ?string,
type: GraphQLOutputType,
Expand All @@ -905,17 +905,15 @@ export type GraphQLField<
isDeprecated?: boolean,
deprecationReason?: ?string,
astNode?: ?FieldDefinitionNode,
...
};
|};

export type GraphQLArgument = {
export type GraphQLArgument = {|
name: string,
type: GraphQLInputType,
defaultValue?: mixed,
description?: ?string,
astNode?: ?InputValueDefinitionNode,
...
};
|};

export function isRequiredArgument(arg: GraphQLArgument): boolean %checks {
return isNonNullType(arg.type) && arg.defaultValue === undefined;
Expand Down Expand Up @@ -1273,15 +1271,14 @@ export type GraphQLEnumValueConfig /* <T> */ = {|
astNode?: ?EnumValueDefinitionNode,
|};

export type GraphQLEnumValue /* <T> */ = {
export type GraphQLEnumValue /* <T> */ = {|
name: string,
description: ?string,
isDeprecated?: boolean,
deprecationReason: ?string,
astNode?: ?EnumValueDefinitionNode,
value: any /* T */,
...
};
|};

/**
* Input Object Type Definition
Expand Down Expand Up @@ -1392,14 +1389,13 @@ export type GraphQLInputFieldConfig = {|

export type GraphQLInputFieldConfigMap = ObjMap<GraphQLInputFieldConfig>;

export type GraphQLInputField = {
export type GraphQLInputField = {|
name: string,
type: GraphQLInputType,
defaultValue?: mixed,
description?: ?string,
astNode?: ?InputValueDefinitionNode,
...
};
|};

export function isRequiredInputField(
field: GraphQLInputField,
Expand Down