enumType<Value> function
GraphQLEnumType<Value>
enumType<Value>(
- String name,
- Map<
String, Value> values, { - String? description,
- GraphQLTypeDefinitionExtra<
EnumTypeDefinitionNode, EnumTypeExtensionNode> extra = const GraphQLTypeDefinitionExtra.attach([]),
Shorthand for building a GraphQLEnumType.
Implementation
GraphQLEnumType<Value> enumType<Value>(
String name,
Map<String, Value> values, {
String? description,
GraphQLTypeDefinitionExtra<EnumTypeDefinitionNode, EnumTypeExtensionNode>
extra = const GraphQLTypeDefinitionExtra.attach([]),
}) {
return GraphQLEnumType(
name,
values.entries.map((e) => GraphQLEnumValue(e.key, e.value)).toList(),
description: description,
extra: extra,
);
}