All Downloads are FREE. Search and download functionalities are using the official Maven repository.

caliban.federation.v2x.FederationDirectivesV2_5.scala Maven / Gradle / Ivy

The newest version!
package caliban.federation.v2x

import caliban.InputValue.ListValue
import caliban.Value.StringValue
import caliban.parsing.adt.Directive
import caliban.schema.Annotations.GQLDirective

trait FederationDirectivesV2_5 extends FederationDirectivesV2_3 {

  val Authenticated                              = Directive("authenticated")
  def RequiresScopes(scopes: List[List[String]]) =
    Directive("requiresScopes", Map("scopes" -> ListValue(scopes.map(s => ListValue(s.map(s => StringValue(s)))))))
  case class GQLAuthenticated() extends GQLDirective(Authenticated)

  case class GQLRequiresScopes(scopes: List[List[String]]) extends GQLDirective(RequiresScopes(scopes))

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy