import { SurveyType } from '../types' ; import { getEntities , getEntity } from '../entities' ; import { getLocales , getLocaleObject , getTranslation } from '../i18n' ; import { SurveyConfig } from '../types' ; export default { Query : { survey : ( parent , { survey } ) => ( { survey } ) , entity : async ( survey , { id } ) => ( { survey , ... ( await getEntity ( { id } ) ) } ) , entities : ( parent , { type , tag , tags } ) => getEntities ( { type , tag , tags } ) , translation : ( parent , { key , localeId } ) => getTranslation ( key , localeId ) , locale : ( parent , { localeId , contexts , enableFallbacks } ) => getLocaleObject ( localeId , contexts , enableFallbacks ) , locales : ( parent , { contexts , enableFallbacks } ) => getLocales ( contexts , enableFallbacks ) } } ;