Skip to content

Commit

Permalink
add changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacovCR committed Jul 12, 2021
1 parent ca36f64 commit 12a8fb9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .changeset/quick-hotels-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'@graphql-tools/stitch': major
'@graphql-tools/stitching-directives': major
'@graphql-tools/utils': major
'@graphql-tools/wrap': major
---

fix(getDirectives): preserve order around repeatable directives

BREAKING CHANGE: getDirectives now always return an array of individual DirectiveAnnotation objects consisting of `name` and `args` properties.

New useful function `getDirective` returns an array of objects representing any args for each use of a single directive (returning the empty object `{}` when a directive is used without arguments).

Note: The `getDirective` function returns an array even when the specified directive is non-repeatable. This is because one use of this function is to throw an error if more than one directive annotation is used for a non repeatable directive!

When specifying directives in extensions, one can use either the old or new format.

0 comments on commit 12a8fb9

Please sign in to comment.