import { ValueNode } from "graphql" ; import * as RDF from "@rdfjs/types" ; import { Algebra } from "sparqlalgebrajs" ; import { IConvertContext } from "../../IConvertContext" ; import { IConvertSettings } from "../../IConvertSettings" ; import { Util } from "../../Util" ; /**
 * A handler for converting GraphQL value nodes to terms and patterns.
 */ export abstract class NodeValueHandlerAdapter < T extends ValueNode > { public readonly targetKind : string ; protected readonly util : Util ; protected readonly settings : IConvertSettings ; constructor ( targetKind , util , settings ) { this . targetKind = targetKind ; this . util = util ; this . settings = settings ; } param { T } valueNode param { string } fieldName param { IConvertContext } convertContext return { IValueNodeHandlerOutput } public abstract handle ( valueNode , fieldName , convertContext ) ; } /**
 * The output of converting a value node to an RDF term.
 */ export interface IValueNodeHandlerOutput { /**
     * The resulting RDF terms.
     */ terms : RDF . Term [ ] ; /**
     * An optional array of patterns that are dependencies of the resulting term(s).
     */ auxiliaryPatterns ? : Algebra . Pattern [ ] ; }