Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.
This repository was archived by the owner on May 19, 2025. It is now read-only.

extending Null ignores additional validation rules #238

@ex37

Description

@ex37

As long as I mainly use optional types, to be able to update individual properties, instead of passing whole object, I want to create an optional type, so instead of writing:

type User {
  id: String | Null;
  active: Boolean | Null;
  ....
}

I can do smth like:

type User {
  id: Str;
  active: Bool;
}
type Str extends Null {
  validate() { this.isString() }
}

When doing so, following is generated:

"id": {
  ".validate": "false"
},

In addition, would be nice to have ability to implement something like O<T>, i.e. O<String>, O<Boolean>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions