UNPKG

@neo4j/graphql

Version:

A GraphQL to Cypher query execution layer for Neo4j and JavaScript GraphQL implementations

105 lines 3.85 kB
import type { DirectiveNode, NamedTypeNode } from "graphql"; import type { ConnectionField, CustomEnumField, CustomScalarField, CypherField, FullText, InterfaceField, ObjectField, PointField, PrimitiveField, RelationField, TemporalField, UnionField } from "../types"; import type { Neo4jGraphQLContext } from "../types/neo4j-graphql-context"; import type { DecodedGlobalId } from "../utils/global-ids"; import type { GraphElementConstructor } from "./GraphElement"; import { GraphElement } from "./GraphElement"; import type { LimitDirective } from "./LimitDirective"; import type { NodeDirective } from "./NodeDirective"; export interface NodeConstructor extends GraphElementConstructor { name: string; relationFields: RelationField[]; connectionFields: ConnectionField[]; cypherFields: CypherField[]; primitiveFields: PrimitiveField[]; scalarFields: CustomScalarField[]; enumFields: CustomEnumField[]; otherDirectives: DirectiveNode[]; propagatedDirectives: DirectiveNode[]; unionFields: UnionField[]; interfaceFields: InterfaceField[]; interfaces: NamedTypeNode[]; objectFields: ObjectField[]; temporalFields: TemporalField[]; pointFields: PointField[]; plural?: string; fulltextDirective?: FullText; nodeDirective?: NodeDirective; description?: string; limitDirective?: LimitDirective; isGlobalNode?: boolean; globalIdField?: string; globalIdFieldIsInt?: boolean; } export type MutableField = PrimitiveField | CustomScalarField | CustomEnumField | UnionField | TemporalField | CypherField; export type RootTypeFieldNames = { create: string; read: string; update: string; delete: string; aggregate: string; subscribe: { created: string; updated: string; deleted: string; }; }; export type AggregateTypeNames = { selection: string; input: string; }; export type MutationResponseTypeNames = { create: string; update: string; }; export type SubscriptionEvents = { create: string; update: string; delete: string; create_relationship: string; delete_relationship: string; }; declare class Node extends GraphElement { relationFields: RelationField[]; connectionFields: ConnectionField[]; cypherFields: CypherField[]; otherDirectives: DirectiveNode[]; propagatedDirectives: DirectiveNode[]; unionFields: UnionField[]; interfaceFields: InterfaceField[]; interfaces: NamedTypeNode[]; objectFields: ObjectField[]; nodeDirective?: NodeDirective; limit?: LimitDirective; singular: string; plural: string; isGlobalNode: boolean | undefined; private _idField; private _idFieldIsInt?; constructor(input: NodeConstructor); get mutableFields(): MutableField[]; /** Fields you can apply auth allow and bind to */ get authableFields(): MutableField[]; private get pascalCaseSingular(); private get pascalCasePlural(); get rootTypeFieldNames(): RootTypeFieldNames; get aggregateTypeNames(): AggregateTypeNames; get mutationResponseTypeNames(): MutationResponseTypeNames; get subscriptionEventTypeNames(): SubscriptionEvents; get subscriptionEventPayloadFieldNames(): SubscriptionEvents; getLabelString(context: Neo4jGraphQLContext): string; /** * Returns the list containing labels mapped with the values contained in the Context. * Be careful when using this method, labels returned are unescaped. **/ getLabels(context: Neo4jGraphQLContext): string[]; getMainLabel(): string; getAllLabels(): string[]; getGlobalIdField(): string; toGlobalId(id: string): string; fromGlobalId(relayId: string): DecodedGlobalId; private generateSingular; private generatePlural; } export default Node; //# sourceMappingURL=Node.d.ts.map