Skip to content

Commit

Permalink
Remove some unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
angrykoala committed Nov 5, 2024
1 parent 9c75f92 commit 47c86b7
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 528 deletions.
16 changes: 0 additions & 16 deletions packages/graphql/src/classes/Node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ type MutableField = PrimitiveField | CustomScalarField | CustomEnumField | Union

type AuthableField = PrimitiveField | CustomScalarField | CustomEnumField | UnionField | TemporalField | CypherField;

type ConstrainableField = PrimitiveField | CustomScalarField | CustomEnumField | TemporalField;

export type RootTypeFieldNames = {
create: string;
read: string;
Expand Down Expand Up @@ -178,20 +176,6 @@ class Node extends GraphElement {
];
}

public get constrainableFields(): ConstrainableField[] {
return [
...this.primitiveFields,
...this.scalarFields,
...this.enumFields,
...this.temporalFields,
...this.pointFields,
];
}

public get uniqueFields(): ConstrainableField[] {
return this.constrainableFields.filter((field) => field.unique);
}

private get pascalCaseSingular(): string {
return upperFirst(this.singular);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export class ConcreteEntityAdapter {

// These keys allow to store the keys of the map in memory and avoid keep iterating over the map.
private mutableFieldsKeys: string[] = [];
private constrainableFieldsKeys: string[] = [];

private _relatedEntities: EntityAdapter[] | undefined;

Expand Down Expand Up @@ -77,10 +76,6 @@ export class ConcreteEntityAdapter {
this.mutableFieldsKeys.push(attribute.name);
}

if (attributeAdapter.isConstrainable()) {
this.constrainableFieldsKeys.push(attribute.name);
}

if (attributeAdapter.isGlobalIDAttribute()) {
this._globalIdField = attributeAdapter;
}
Expand Down Expand Up @@ -153,10 +148,6 @@ export class ConcreteEntityAdapter {
return this.mutableFieldsKeys.map((key) => getFromMap(this.attributes, key));
}

public get constrainableFields(): AttributeAdapter[] {
return this.constrainableFieldsKeys.map((key) => getFromMap(this.attributes, key));
}

public get relatedEntities(): EntityAdapter[] {
if (!this._relatedEntities) {
this._relatedEntities = [...this.relationships.values()].map((relationship) => relationship.target);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export class InterfaceEntityAdapter {
public readonly attributes: Map<string, AttributeAdapter> = new Map();
public readonly relationshipDeclarations: Map<string, RelationshipDeclarationAdapter> = new Map();
public readonly annotations: Partial<Annotations>;
private uniqueFieldsKeys: string[] = [];

private _singular: string | undefined;
private _plural: string | undefined;
Expand Down
Loading

0 comments on commit 47c86b7

Please sign in to comment.