Skip to content

Commit

Permalink
Fix: mark MaxAliasesOptions's allowList property as optional (#685)
Browse files Browse the repository at this point in the history
* Fix: mark MaxAliasesOptions allowList property as optional; a default empty array is provided via maxAliasesDefaultOptions

* chore(yarn changeset): ran yarn changeset
  • Loading branch information
Stephen-ONeil committed Jul 2, 2024
1 parent 05fa628 commit ca9f663
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/ninety-actors-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@escape.tech/graphql-armor-max-aliases': minor
---

fix: improve MaxAliasesOptions typing, mark allowList property as optional [#685](https://github.com/Escape-Technologies/graphql-armor/pull/685)
2 changes: 1 addition & 1 deletion packages/plugins/max-aliases/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
ValidationContext,
} from 'graphql';

type MaxAliasesOptions = { n?: number; allowList: string[] } & GraphQLArmorCallbackConfiguration;
type MaxAliasesOptions = { n?: number; allowList?: string[] } & GraphQLArmorCallbackConfiguration;
const maxAliasesDefaultOptions: Required<MaxAliasesOptions> = {
n: 15,
onAccept: [],
Expand Down

0 comments on commit ca9f663

Please sign in to comment.