-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
133 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
126 changes: 0 additions & 126 deletions
126
packages/graphql-platform/src/node/operation/mutation/replace.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
packages/graphql-platform/src/node/type/input/filter/abstract-field.ts
This file was deleted.
Oops, something went wrong.
30 changes: 25 additions & 5 deletions
30
packages/graphql-platform/src/node/type/input/filter/field.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
export * from './abstract-field.js'; | ||
export * from './field/boolean-operation.js'; | ||
export * from './field/edge.js'; | ||
export * from './field/leaf.js'; | ||
export * from './field/reverse-edge.js'; | ||
import * as utils from '@prismamedia/graphql-platform-utils'; | ||
import type { Except } from 'type-fest'; | ||
import type { OperationContext } from '../../../operation/context.js'; | ||
import type { BooleanFilter } from '../../../statement/filter/boolean.js'; | ||
|
||
export type FieldFilterInputConfig<TValue> = Except< | ||
utils.InputConfig<TValue>, | ||
'defaultValue' | 'parser' | ||
> & { | ||
filter( | ||
value: Exclude<TValue, undefined>, | ||
context: OperationContext | undefined, | ||
path: utils.Path, | ||
): BooleanFilter; | ||
}; | ||
|
||
export class FieldFilterInput<TValue = any> extends utils.Input<TValue> { | ||
public readonly filter: FieldFilterInputConfig<TValue>['filter']; | ||
|
||
public constructor({ filter, ...config }: FieldFilterInputConfig<TValue>) { | ||
super(config); | ||
|
||
this.filter = filter; | ||
} | ||
} |
5 changes: 0 additions & 5 deletions
5
packages/graphql-platform/src/node/type/input/filter/field/boolean-operation.ts
This file was deleted.
Oops, something went wrong.
24 changes: 8 additions & 16 deletions
24
packages/graphql-platform/src/node/type/input/filter/field/edge.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.