Skip to content

Commit

Permalink
Renamed boolean flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mackcheesman committed Feb 10, 2025
1 parent 9deb397 commit 1aa7d91
Show file tree
Hide file tree
Showing 24 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/examples/auth-zero/src/frontend/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/auth-zero/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/aws-cognito/src/frontend/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/aws-cognito/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/federation/src/frontend/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/federation/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/microsoft-entra/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/okta/src/frontend/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/okta/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/rest-with-auth/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/rest-with-auth/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/rest/src/frontend/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/rest/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/sqlite/src/frontend/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/sqlite/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export type AdminUiEntityMetadata = {
name: Scalars['String']['output'];
plural: Scalars['String']['output'];
primaryKeyField: Scalars['String']['output'];
providerComparisonSupported: Scalars['Boolean']['output'];
summaryField?: Maybe<Scalars['String']['output']>;
supportedAggregationTypes: Array<AggregationType>;
supportsPseudoCursorPagination: Scalars['Boolean']['output'];
};

export type AdminUiEnumMetadata = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const EntityList = <TData extends object>() => {
defaultFilter,
fieldForDetailPanelNavigationId,
excludeFromTracing,
providerComparisonSupported
supportsPseudoCursorPagination
} = entity;
const columns = useMemo(
() => convertEntityToColumns(entity, entityByType),
Expand Down Expand Up @@ -100,10 +100,10 @@ export const EntityList = <TData extends object>() => {

const handleFetchNextPage = async () => {
const nextPage = Math.ceil((data?.result.length ?? 0) / PAGE_SIZE);
const offset = providerComparisonSupported ? 0 : nextPage * PAGE_SIZE;
const offset = supportsPseudoCursorPagination ? 0 : nextPage * PAGE_SIZE;

const filterVar = variables.filter ?? {};
const filter = providerComparisonSupported ? addStabilizationToFilter(filterVar, sort, data?.result?.[data.result.length - 1]) : filterVar;
const filter = supportsPseudoCursorPagination ? addStabilizationToFilter(filterVar, sort, data?.result?.[data.result.length - 1]) : filterVar;
fetchMore({
variables: {
...variables,
Expand Down
2 changes: 1 addition & 1 deletion src/packages/admin-ui-components/src/utils/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const SCHEMA_QUERY = gql`
defaultSort
hideInSideBar
supportedAggregationTypes
providerComparisonSupported
supportsPseudoCursorPagination
fields {
name
type
Expand Down
2 changes: 1 addition & 1 deletion src/packages/admin-ui-components/src/utils/use-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface Entity {
summaryField?: string;
fieldForDetailPanelNavigationId: string;
supportedAggregationTypes: AggregationType[];
providerComparisonSupported: boolean;
supportsPseudoCursorPagination: boolean;
fields: EntityField[];
defaultFilter?: Filter;
defaultSort?: SortEntity;
Expand Down
2 changes: 1 addition & 1 deletion src/packages/core/src/metadata-service/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class AdminUiEntityMetadata {
supportedAggregationTypes!: AggregationType[];

@Field(() => Boolean)
providerComparisonSupported!: boolean;
supportsPseudoCursorPagination!: boolean;

@Field(() => Boolean)
hideInSideBar!: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/packages/core/src/metadata-service/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const resolveAdminUiMetadata = (hooks?: Hooks) => {
supportedAggregationTypes: [
...(provider?.backendProviderConfig?.supportedAggregationTypes ?? new Set()),
],
providerComparisonSupported: provider?.backendProviderConfig?.providerComparisonSupported ?? false,
supportsPseudoCursorPagination: provider?.backendProviderConfig?.supportsPseudoCursorPagination ?? false,
};
});

Expand Down
2 changes: 1 addition & 1 deletion src/packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export interface BackendProviderConfig {
// Default is 'find', which will call the find method on the provider with a filter like `{ id_in: ['1', '2'] }`.
// If you specify 'findOne', it will repeatedly call the findOne method on the provider with a filter like `{ id: '1' }`.
idListLoadingMethod?: 'find' | 'findOne';
providerComparisonSupported?: boolean;
supportsPseudoCursorPagination?: boolean;
}

export type Constructor<T extends object, Arguments extends unknown[] = any[]> = new (
Expand Down
2 changes: 1 addition & 1 deletion src/packages/mikroorm/src/provider/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class MikroBackendProvider<D> implements BackendProvider<D> {
pagination: false,
orderBy: false,
supportedAggregationTypes: new Set<AggregationType>([AggregationType.COUNT]),
providerComparisonSupported: true,
supportsPseudoCursorPagination: true,
};

get backendId() {
Expand Down

0 comments on commit 1aa7d91

Please sign in to comment.