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:
Carlos R. L. Rodrigues
2024-03-29 09:26:24 +00:00
committed by GitHub
parent cbb5e6bd99
commit 1c6ba4468e
10 changed files with 356 additions and 34 deletions
+5
View File
@@ -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[]
+3 -1
View File
@@ -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 {