public static void WriteType(
            this DocumentWriter writer,
            ITypeNode node)
        {
            switch (node)
            {
            case NonNullTypeNode value:
                writer.WriteNonNullType(value);
                break;

            case ListTypeNode value:
                writer.WriteListType(value);
                break;

            case NamedTypeNode value:
                writer.WriteNamedType(value);
                break;

            default:
                throw new NotSupportedException();
            }
        }