@neo4j/graphql
Version:
A GraphQL to Cypher query execution layer for Neo4j and JavaScript GraphQL implementations
41 lines • 2.08 kB
TypeScript
import type { GraphQLFieldResolver, GraphQLResolveInfo } from "graphql";
import type { Driver } from "neo4j-driver";
import type { Node, Relationship } from "../../../classes";
import { Executor } from "../../../classes/Executor";
import type { Neo4jDatabaseInfo } from "../../../classes/Neo4jDatabaseInfo";
import type { Neo4jGraphQLAuthorization } from "../../../classes/authorization/Neo4jGraphQLAuthorization";
import type { Neo4jGraphQLSchemaModel } from "../../../schema-model/Neo4jGraphQLSchemaModel";
import type { AuthorizationContext, ContextFeatures, FulltextContext, VectorContext } from "../../../types";
import type { Neo4jGraphQLContext } from "../../../types/neo4j-graphql-context";
export type WrapResolverArguments = {
driver?: Driver;
nodes: Node[];
relationships: Relationship[];
jwtPayloadFieldsMap?: Map<string, string>;
schemaModel: Neo4jGraphQLSchemaModel;
dbInfo?: Neo4jDatabaseInfo;
features: ContextFeatures;
authorization?: Neo4jGraphQLAuthorization;
};
/**
* The type describing the context generated by {@link wrapQueryAndMutation}.
*/
export interface Neo4jGraphQLComposedContext extends Neo4jGraphQLContext {
/**
* @deprecated The use of this field is now deprecated in favour of {@link schemaModel}.
*/
nodes: Node[];
/**
* @deprecated The use of this field is now deprecated in favour of {@link schemaModel}.
*/
relationships: Relationship[];
schemaModel: Neo4jGraphQLSchemaModel;
features: ContextFeatures;
executor: Executor;
authorization: AuthorizationContext;
neo4jDatabaseInfo?: Neo4jDatabaseInfo;
fulltext?: FulltextContext;
vector?: VectorContext;
}
export declare const wrapQueryAndMutation: ({ driver, nodes, relationships, jwtPayloadFieldsMap, schemaModel, dbInfo, authorization, features, }: WrapResolverArguments) => (next: GraphQLFieldResolver<any, Neo4jGraphQLComposedContext>) => (root: any, args: any, context: Neo4jGraphQLContext, info: GraphQLResolveInfo) => Promise<unknown>;
//# sourceMappingURL=wrap-query-and-mutation.d.ts.map