import { GraphQLEnumType } from "https://dotland.deno.dev/x/graphql_deno@v15.0.0/lib/type/definition.js";
Enum Type Definition
Some leaf values of requests and input values are Enums. GraphQL serializes Enum values as strings, however internally Enums can be represented by any kind of type, often integers.
Example:
const RGBType = new GraphQLEnumType({
name: 'RGB',
values: {
RED: { value: 0 },
GREEN: { value: 1 },
BLUE: { value: 2 }
}
});
Note: If a value is not provided in a definition, the name of the enum value will be used as its internal value.
Methods
getValue(name)
parseLiteral(valueNode, _variables)
parseValue(inputValue)
serialize(outputValue)
toConfig()
toString()