2025-12-01

This commit is contained in:
2026-03-17 14:58:51 -06:00
parent 183e865f8b
commit 4b82b57113
6846 changed files with 954887 additions and 162606 deletions
@@ -0,0 +1,34 @@
from typing import Any
__all__ = ["Undefined", "UndefinedType"]
class UndefinedType(ValueError):
"""Auxiliary class for creating the Undefined singleton."""
def __repr__(self) -> str:
return "Undefined"
__str__ = __repr__
def __hash__(self) -> int:
return hash(UndefinedType)
def __bool__(self) -> bool:
return False
def __eq__(self, other: Any) -> bool:
return other is Undefined
def __ne__(self, other: Any) -> bool:
return not self == other
# Used to indicate undefined or invalid values (like "undefined" in JavaScript):
Undefined = UndefinedType()
Undefined.__doc__ = """Symbol for undefined values
This singleton object is used to describe undefined or invalid values.
It can be used in places where you would use ``undefined`` in GraphQL.js.
"""