Skip to content

Commit

Permalink
Attempt to fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpdaniels committed Feb 2, 2025
1 parent 3a9cdcd commit 74a266e
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ object FederationV2Spec extends ZIOSpecDefault {

@GQLKey("id")
@GQLShareable
case class Entity(
case class User(
id: UUID
)

case class Query(
hello: String,
entity: Entity
user: User
)
}

Expand Down Expand Up @@ -251,19 +251,18 @@ object FederationV2Spec extends ZIOSpecDefault {

},
test("renderer renders the schema including the extensions") {
import caliban.federation.v2_3._
import SchemaWithEntity.{ Query, Entity }
import SchemaWithEntity.{ Query, User }

val api = graphQL(
RootResolver(
Query(hello = "Hello World!", entity = Entity(UUID.randomUUID()))
Query(hello = "Hello World!", user = User(UUID.randomUUID()))
)
)

assertTrue(
renderFederatedCompact(
caliban.federation.v2_3.renderFederatedCompact(
api
) == """schema@link(url:"https://specs.apollo.dev/federation/v2.3",import:["@key","@requires","@provides","@external","@shareable","@tag","@inaccessible","@override","@extends","@composeDirective","@interfaceObject"]){query:Query}type Entity@key(fields:"id")@shareable{id:ID!}type Query{hello:String! entity:Entity!}"""
) == """schema@link(url:"https://specs.apollo.dev/federation/v2.3",import:["@key","@requires","@provides","@external","@shareable","@tag","@inaccessible","@override","@extends","@composeDirective","@interfaceObject"]){query:Query}type Query{hello:String! user:User!}type User@key(fields:"id")@shareable{id:ID!}"""
)

}
Expand Down

0 comments on commit 74a266e

Please sign in to comment.