import { DocumentNode as GraphQLDocument , } from "graphql" ; import gqlTag from "graphql-tag" ; import { ObserverNeedsData } from "./errors" ; import { ExecutedQuery , Observations } from "./obs_manager_deployment" ; export const gql = gqlTag ; export { ObserverNeedsData , throwObserverErrors , } from "./errors" ; export { createObserverManagerDeployment , ObserverManagerDeployment , ExecutedQuery , simplifyNeedsData , ObserversThatNeedData , Observations , Variables , } from "./obs_manager_deployment" ; export { ObserverPlugin , ObserverResponse } from "./plugin" ; export { registerObserver , observe , makeObserverManagerDeployment , ObserverNameHolder , } from "./registry" ; export { Observer , ObserverProps , } from "./Observer" ; export function patchInNewQueries ( observations , queries ) { for ( const name in observations ) { if ( ! Object . hasOwnProperty . call ( observations , name ) ) continue ; if ( queries [ name ] !== undefined ) { observations [ name ] . queries = queries [ name ] ; } } } export function isObserverNeedsData ( e ) { return e instanceof ObserverNeedsData ; }