(outputValue)
| 4908 | return this._nameLookup[name]; |
| 4909 | } |
| 4910 | serialize(outputValue) { |
| 4911 | if (this._valueLookup === null) { |
| 4912 | this._valueLookup = new Map( |
| 4913 | this.getValues().map((enumValue2) => [enumValue2.value, enumValue2]) |
| 4914 | ); |
| 4915 | } |
| 4916 | const enumValue = this._valueLookup.get(outputValue); |
| 4917 | if (enumValue === void 0) { |
| 4918 | throw new _GraphQLError.GraphQLError( |
| 4919 | `Enum "${this.name}" cannot represent value: ${(0, _inspect.inspect)( |
| 4920 | outputValue |
| 4921 | )}` |
| 4922 | ); |
| 4923 | } |
| 4924 | return enumValue.name; |
| 4925 | } |
| 4926 | parseValue(inputValue) { |
| 4927 | if (typeof inputValue !== "string") { |
| 4928 | const valueStr = (0, _inspect.inspect)(inputValue); |
no test coverage detected