-
-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add transformer that excludes fields / inputs based on directives (#2293
) * Add transformer that excludes fields / inputs based on tags * Fix scaladoc * Fix Scala 3 derivation * Define tags as non-introspectable directives * Change transformer to work on directives instead * Fix for Scala 3 * PR comment * Add overload of `ExcludeDirectives.apply` that takes a predicate
- Loading branch information
1 parent
1180ee6
commit 7078afb
Showing
13 changed files
with
291 additions
and
30 deletions.
There are no files selected for viewing
18 changes: 17 additions & 1 deletion
18
core/src/main/scala-2/caliban/schema/AnnotationsVersionSpecific.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
package caliban.schema | ||
|
||
trait AnnotationsVersionSpecific | ||
import caliban.parsing.adt.Directive | ||
|
||
import scala.annotation.StaticAnnotation | ||
|
||
trait AnnotationsVersionSpecific { | ||
|
||
/** | ||
* Annotation used to provide directives to a schema type | ||
*/ | ||
class GQLDirective(val directive: Directive) extends StaticAnnotation | ||
|
||
object GQLDirective { | ||
def unapply(annotation: GQLDirective): Option[Directive] = | ||
Some(annotation.directive) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
core/src/main/scala/caliban/introspection/adt/__InputValue.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.