@omnigraph/odata
Version:
121 lines (120 loc) • 4.29 kB
TypeScript
import { GraphQLDirective, type GraphQLSchema } from 'graphql';
import type { MeshFetch } from '@graphql-mesh/types';
export declare const EntityInfoDirective: GraphQLDirective;
export interface EntityInfoDirectiveArgs {
actualFields: string[];
navigationFields: string[];
identifierFieldName?: string;
identifierFieldTypeRef?: string;
isOpenType: boolean;
}
export declare const SingularNavDirective: GraphQLDirective;
export interface SingularNavDirectiveArgs {
navigationPropertyName: string;
}
export declare const PluralNavDirective: GraphQLDirective;
export interface PluralNavDirectiveArgs {
navigationPropertyName: string;
}
export declare const NavPropDirective: GraphQLDirective;
export interface NavPropDirectiveArgs {
navigationPropertyName: string;
}
export declare const ResolveRootDirective: GraphQLDirective;
export interface ResolveRootDirectiveArgs {
}
export declare const UnboundFunctionDirective: GraphQLDirective;
export interface UnboundFunctionDirectiveArgs {
functionName: string;
}
export declare const BoundFunctionDirective: GraphQLDirective;
export interface BoundFunctionDirectiveArgs {
functionRef: string;
}
export declare const UnboundActionDirective: GraphQLDirective;
export interface UnboundActionDirectiveArgs {
actionName: string;
}
export declare const BoundActionDirective: GraphQLDirective;
export interface BoundActionDirectiveArgs {
actionRef: string;
}
export declare const SingletonDirective: GraphQLDirective;
export interface SingletonDirectiveArgs {
singletonName: string;
}
export declare const EntitySetDirective: GraphQLDirective;
export interface EntitySetDirectiveArgs {
entitySetName: string;
}
export declare const EntitySetByIdentifierDirective: GraphQLDirective;
export interface EntitySetByIdentifierDirectiveArgs {
entitySetName: string;
identifierFieldName: string;
identifierFieldTypeRef: string;
}
export declare const EntitySetCountDirective: GraphQLDirective;
export interface EntitySetCountDirectiveArgs {
entitySetName: string;
}
export declare const CreateEntitySetDirective: GraphQLDirective;
export interface CreateEntitySetDirectiveArgs {
entitySetName: string;
}
export declare const DeleteEntitySetDirective: GraphQLDirective;
export interface DeleteEntitySetDirectiveArgs {
entitySetName: string;
identifierFieldName: string;
identifierFieldTypeRef: string;
}
export declare const UpdateEntitySetDirective: GraphQLDirective;
export interface UpdateEntitySetDirectiveArgs {
entitySetName: string;
identifierFieldName: string;
identifierFieldTypeRef: string;
}
export declare const AbstractTypeDirective: GraphQLDirective;
export interface AbstractTypeDirectiveArgs {
entityTypeName: string;
isAbstract: boolean;
aliasNamespaceMap: [string, string][];
multipleSchemas: boolean;
namespaces: string[];
}
export declare const TransportDirective: GraphQLDirective;
export interface TransportDirectiveArgs {
kind: 'odata';
subgraph: string;
location: string;
headers: [string, string][];
options: {
batch: 'none' | 'json' | 'multipart';
expandNavProps: boolean;
};
}
export interface DirectiveArgsMap {
entityInfo?: EntityInfoDirectiveArgs;
singularNav?: SingularNavDirectiveArgs;
pluralNav?: PluralNavDirectiveArgs;
navProp?: NavPropDirectiveArgs;
resolveRoot?: ResolveRootDirectiveArgs;
unboundFunction?: UnboundFunctionDirectiveArgs;
boundFunction?: BoundFunctionDirectiveArgs;
unboundAction?: UnboundActionDirectiveArgs;
boundAction?: BoundActionDirectiveArgs;
singleton?: SingletonDirectiveArgs;
entitySet?: EntitySetDirectiveArgs;
entitySetByIdentifier?: EntitySetByIdentifierDirectiveArgs;
entitySetCount?: EntitySetCountDirectiveArgs;
createEntitySet?: CreateEntitySetDirectiveArgs;
deleteEntitySet?: DeleteEntitySetDirectiveArgs;
updateEntitySet?: UpdateEntitySetDirectiveArgs;
abstractType?: AbstractTypeDirectiveArgs;
transport?: TransportDirectiveArgs;
[key: string]: unknown;
}
export interface ProcessDirectivesArgs {
schema: GraphQLSchema;
fetchFn: MeshFetch;
}
export declare function processDirectives({ schema, fetchFn }: ProcessDirectivesArgs): GraphQLSchema;