Skip to content

Commit

Permalink
SchemaObject polymorphism
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed May 21, 2024
1 parent 230e270 commit d23cf69
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions text/1027-ember-data-schema-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,26 @@ export type SchemaObjectField = {
*/
type: string;

// Currently, no need for options has been discovered.
// should such a need arise later we do not believe a follow
// up RFC is required to add it in, and it would be optional.
// options?: ObjectValue;
options?: {
/**
* Whether this SchemaObject is Polymorphic.
*
* If the SchemaObject is polymorphic, `options.type` must also be supplied.
*
* @typedoc
*/
polymorphic?: boolean;

/**
* If the SchemaObject is Polymorphic, the key on the raw cache data to use
* as the "resource-type" value for the schema-object.
*
* Defaults to "type".
*
* @typedoc
*/
type?: string;
};
};

/**
Expand Down Expand Up @@ -707,7 +723,7 @@ export type LegacyAttributeField = {
};

/**
* * > [!CAUTION]
* > [!CAUTION]
* > This Field is LEGACY
*
* Represents a field that is a reference to
Expand Down

0 comments on commit d23cf69

Please sign in to comment.