Skip to content

Commit

Permalink
Merge pull request #616 from sangria-graphql/revert_new_implicit
Browse files Browse the repository at this point in the history
Revert "Merge pull request #600 from ocordsen/master"
  • Loading branch information
yanns authored Apr 17, 2021
2 parents 6ba34ad + ae52e92 commit a5fccba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ object GraphQLOutputTypeLookup extends GraphQLOutputTypeLookupLowPrio {
override val graphqlType: OutputType[T] = out
}

implicit def interfaceLookup[T](implicit
interfaceType: InterfaceType[_, T]): GraphQLOutputTypeLookup[T] =
new GraphQLOutputTypeLookup[T] {
override def graphqlType: OutputType[T] = interfaceType
}

implicit def optionLookup[T: GraphQLOutputTypeLookup]: GraphQLOutputTypeLookup[Option[T]] =
new GraphQLOutputTypeLookup[Option[T]] {
override val graphqlType: OptionType[T] = OptionType(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -776,26 +776,5 @@ class DeriveObjectTypeMacroSpec extends AnyWordSpec with Matchers with FutureRes

"deriveObjectType[Unit, TestContainer[TestSubject]]()" should compile
}

"derive a context object type with an implicit interface type and an implicit object type implementing the interface" in {
trait Parent3 {
def id: String
}

case class TestSubject1(id: String, list: List[String] = Nil, excluded: Int) extends Parent3

implicit val Parent3Type = InterfaceType(
"Parent3",
fields[Unit, Parent3](Field("id", StringType, resolve = _.value.id)))

implicit val TestSubject1Type = deriveObjectType[Unit, TestSubject1](Interfaces(Parent3Type))

class Query {
@GraphQLField
def myMethod: Parent3 = TestSubject1("123", List("1", "2", "3"), 123)
}

"deriveContextObjectType[Unit, Query, Unit](_ => new Query)" should compile
}
}
}

0 comments on commit a5fccba

Please sign in to comment.