Global

Members

types :Array.<String>

A getter that retrieves the array of direct types

Source:
Type:
  • Array.<String>

Methods

decorate(metaProperty, target, key, descriptor)

Since the bulk functionality of @subscriptor, @mutator and

Source:
Parameters:
Name Type Description
metaProperty string

the name of the meta sub key under which to
store the modified decorated function.

target Object | function

either the Class itself, if defined
on a static method, or the prototype if defined on an instance method

key string

the property name of the function being decorated

descriptor Object

a decorator descriptor; see
Object.defineProperty for more information on descriptors

deleteProperty(target, key)

Proxy deleteProperty() handler. This is where the delete property
events are fired from

Source:
Parameters:
Name Type Description
target Object

the GQLBase model object

key string

the property name

mutator(target, key, descriptor)

The mutator function should perform the necessary insertion to place
the decorated function in question into a place that it can be merged
with the final list of query resolvers. Typically a mutator function,
as defined in RESOLVERS() receives a requestData object. Functions
decorated with @mutator receive this as their first parameter. Code
accordingly.

Source:
Parameters:
Name Type Description
target Object | function

either the Class itself, if defined
on a static method, or the prototype if defined on an instance method

key string

the property name of the function being decorated

descriptor Object

a decorator descriptor; see
Object.defineProperty for more information on descriptors

resolver(target, key, descriptor)

The resolver function should perform the necessary insertion to place
the decorated function in question into a place that it can be merged
with the final list of query resolvers. Typically a resolver function,
as defined in RESOLVERS() receives a requestData object. Functions
decorated with @resolver receive this as their first parameter. Code
accordingly.

Source:
Parameters:
Name Type Description
target Object | function

either the Class itself, if defined
on a static method, or the prototype if defined on an instance method

key string

the property name of the function being decorated

descriptor Object

a decorator descriptor; see
Object.defineProperty for more information on descriptors

set(target, key, value)

Proxy set() handler. This is where the change events are fired from

Source:
Parameters:
Name Type Description
target Object

the GQLBase model object

key string

the property name

value mixed

the new property value

subscriptor(target, key, descriptor)

The subscriptor function should perform the necessary insertion to place
the decorated function in question into a place that it can be merged
with the final list of query resolvers. Typically a subscriptor function,
as defined in RESOLVERS() receives a requestData object. Functions
decorated with @subscriptor receive this as their first parameter.
Code accordingly.

Source:
Parameters:
Name Type Description
target Object | function

either the Class itself, if defined
on a static method, or the prototype if defined on an instance method

key string

the property name of the function being decorated

descriptor Object

a decorator descriptor; see
Object.defineProperty for more information on descriptors

⬇︎⠀name() → {mixed}

Retrieves the actual symbol stored name property from the internal
model object for this enum instance. That is a mouthfull, but it
basically means that if your enum is something like:

enum Person { TALL, SHORT }

and you create an instance using any of the following

p = new Person('TALL')
p = new Person(valueFor('TALL'))
p = new Person({value: 'TALL'})

that your response to p.name will equate to TALL.

Source:
Returns:
Type:
mixed

typically a String but any valid type supplied