Skip to content

Commit

Permalink
Remove filterType from metadata attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiesholl committed Jan 17, 2025
1 parent cdfdbcb commit b921fa3
Show file tree
Hide file tree
Showing 20 changed files with 1 addition and 27 deletions.
1 change: 0 additions & 1 deletion src/examples/auth-zero/src/frontend/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/examples/auth-zero/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/examples/aws-cognito/src/frontend/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/examples/aws-cognito/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/examples/federation/src/frontend/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/examples/federation/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/examples/microsoft-entra/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/examples/okta/src/frontend/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/examples/okta/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/examples/rest-with-auth/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/examples/rest-with-auth/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/examples/rest/src/frontend/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/examples/rest/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/examples/sqlite/src/frontend/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/examples/sqlite/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export type AdminUiEnumValueMetadata = {

export type AdminUiFieldAttributeMetadata = {
__typename?: 'AdminUiFieldAttributeMetadata';
filterType: AdminUiFilterType;
isReadOnly: Scalars['Boolean']['output'];
isRequired: Scalars['Boolean']['output'];
};
Expand Down
1 change: 0 additions & 1 deletion src/packages/admin-ui-components/src/utils/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const SCHEMA_QUERY = gql`
attributes {
isReadOnly
isRequired
filterType
}
extensions {
key
Expand Down
4 changes: 0 additions & 4 deletions src/packages/core/src/metadata-service/field-attribute.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Entity, Field } from '../decorators';
import { AdminUIFilterType } from '../types';

@Entity('AdminUiFieldAttributeMetadata', {
apiOptions: { excludeFromBuiltInOperations: true, excludeFromFederation: true },
Expand All @@ -10,7 +9,4 @@ export class AdminUiFieldAttributeMetadata {

@Field(() => Boolean)
isRequired!: boolean;

@Field(() => AdminUIFilterType)
filterType!: AdminUIFilterType;
}
6 changes: 1 addition & 5 deletions src/packages/core/src/metadata-service/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,9 @@ export const resolveAdminUiMetadata = (hooks?: Hooks) => {
name: field.name,
type: relatedObject?.name || typeName,
isArray: isList,
//@ts-expect-error - TODO fix me
attributes: {
isReadOnly,
isRequired,
// filterType: field.adminUIOptions?.filterType
},
hideInTable: field.adminUIOptions?.hideInTable,
hideInFilterBar: field.adminUIOptions?.hideInFilterBar,
Expand Down Expand Up @@ -141,9 +139,7 @@ export const resolveAdminUiMetadata = (hooks?: Hooks) => {
}

const filterType = field.adminUIOptions?.filterType ?? mapFilterType(fieldObject);
if (fieldObject.attributes) {
fieldObject.attributes.filterType = filterType;
}

fieldObject.filter = { type: filterType };

return fieldObject;
Expand Down

0 comments on commit b921fa3

Please sign in to comment.