import { DocumentNode, FieldNode, OperationDefinitionNode, SelectionSetNode } from "@0no-co/graphql.web"; import { Option } from "@bloodyowl/boxed"; /** * Returns a Set with all keys selected within the direct selection sets * of a given `FieldNode` or `OperationDefinitionNode`. * * { user { id, firstName, lastName } } * => Set{"id", "firstName", "lastName"} * * @param fieldNode FieldNode | OperationDefinitionNode * @returns selectedKeys Set */ export declare const getSelectedKeys: (fieldNode: FieldNode | OperationDefinitionNode, variables: Record) => Set; /** * Serializes the field name and arguments as a symbol. * * { user {id} } * => Symbol(`user`) * * { user(id: "1") {id} } * => Symbol(`user({"id":"1"})`) * * { user(id: $id) {id} } with variables `{"id": "2"}` * => Symbol(`user({"id":"2"})`) * * @param fieldNode * @param variables The variables of the GraphQL operation * @returns symbol */ export declare const getFieldNameWithArguments: (fieldNode: FieldNode, variables: Record) => symbol; /** * Returns a record representation of the arguments passed to a given field * * @param fieldNode * @param variables * @returns Record */ export declare const extractArguments: (fieldNode: FieldNode, variables: Record) => Record; /** * Gets the field name in the response payload from its AST definition * * @param fieldNode * @returns field name */ export declare const getFieldName: (fieldNode: FieldNode) => string; /** * Simplifies the query for internal processing by inlining all fragments. * * @param documentNode * @returns documentNode */ export declare const inlineFragments: (documentNode: DocumentNode) => DocumentNode; /** * Adds `__typename` to all selection sets in the document * * @param documentNode * @returns documentNode */ export declare const addTypenames: (documentNode: DocumentNode) => DocumentNode; export declare const getExecutableOperationName: (document: DocumentNode) => Option; export declare const addIdIfPreviousSelected: (oldSelectionSet: SelectionSetNode, newSelectionSet: SelectionSetNode) => SelectionSetNode; export declare const isExcluded: (fieldNode: FieldNode, variables: Record) => boolean; export declare const getCacheKeyFromOperationNode: (operationNode: OperationDefinitionNode) => Option;