Skip to content

Commit

Permalink
fix(auth): Export some types required by TypeScript typings (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktutnik authored Apr 8, 2023
1 parent 895e2fe commit 71b450e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/auth/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ const typeDefs = /* GraphQL */ `
) on INPUT_FIELD_DEFINITION | ARGUMENT_DEFINITION | FIELD_DEFINITION
`

type AuthorizeContext = Omit<InvocationContext, "directives"> & { directiveArgs: any }
export type AuthorizeContext = Omit<InvocationContext, "directives"> & { directiveArgs: any }

type PolicyFunction = (ctx: AuthorizeContext) => boolean | Promise<boolean>
export type PolicyFunction = (ctx: AuthorizeContext) => boolean | Promise<boolean>

type AuthorizeOptions = {
export type AuthorizeOptions = {
policies: Record<string, PolicyFunction>
queryResolution: "ThrowError" | "Filter"
}
Expand Down Expand Up @@ -76,5 +76,5 @@ const createTransformer = (options: Partial<AuthorizeOptions>) => {
}

export default {
typeDefs, createTransformer
typeDefs, createTransformer,
}

0 comments on commit 71b450e

Please sign in to comment.