import type { Plugin } from 'graphql-yoga'; import type { Logger } from '@cedarjs/api/logger'; import type { CedarGraphQLContext } from '../types.js'; /** * Converts CedarErrors to GraphQLErrors * * This is a workaround for the fact that graphql-yoga doesn't support custom error types. * * Yoga automatically masks unexpected errors and prevents leaking sensitive information to clients. * * Since CedarErrors (such as ServiceValidation errors) are expected, * we need to convert them to GraphQLErrors so that they are not masked. * * See: https://the-guild.dev/graphql/yoga-server/docs/features/error-masking * * @param logger * @returns ExecutionResult */ export declare const useCedarError: (logger: Logger) => Plugin; //# sourceMappingURL=useCedarError.d.ts.map