feat(modules-sdk): remote query retrieve (#6849)
What: Remote Joiner options to check if keys exist on entry points or relations
This commit is contained in:
@@ -83,6 +83,11 @@ export interface RemoteJoinerQuery {
|
||||
directives?: { [field: string]: JoinerDirective[] }
|
||||
}
|
||||
|
||||
export interface RemoteJoinerOptions {
|
||||
throwIfKeyNotFound?: boolean
|
||||
throwIfRelationNotFound?: boolean | string[]
|
||||
}
|
||||
|
||||
export interface RemoteNestedExpands {
|
||||
[key: string]: {
|
||||
fields: string[]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import {
|
||||
JoinerRelationship,
|
||||
JoinerServiceConfig,
|
||||
RemoteJoinerOptions,
|
||||
RemoteJoinerQuery,
|
||||
} from "../joiner"
|
||||
|
||||
@@ -278,7 +279,8 @@ export type ModuleBootstrapDeclaration =
|
||||
|
||||
export type RemoteQueryFunction = (
|
||||
query: string | RemoteJoinerQuery | object,
|
||||
variables?: Record<string, unknown>
|
||||
variables?: Record<string, unknown>,
|
||||
options?: RemoteJoinerOptions
|
||||
) => Promise<any> | null
|
||||
|
||||
export interface IModuleService {
|
||||
|
||||
Reference in New Issue
Block a user