Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested inputs do not return all types #98

Closed
fokot opened this issue Nov 29, 2019 · 1 comment · Fixed by #101
Closed

Nested inputs do not return all types #98

fokot opened this issue Nov 29, 2019 · 1 comment · Fixed by #101
Labels
bug Something isn't working server Issue related to caliban server

Comments

@fokot
Copy link
Contributor

fokot commented Nov 29, 2019

If inputs are more than 2 levels deep not all types are returned. In Queries it is ok (I mean output types).

Example graphiql error:

"message": "Invalid or incomplete schema, unknown type: EngineInput. Ensure that a full introspection query is used in order to build a client schema.",

Example schema:

import caliban.{CalibanError, GraphQL, RootResolver}
import caliban.GraphQL.graphQL
import zio.Task

object NestedTest {

  case class Engine(serial: String, fuel: String)
  case class SpaceShip(serial: String, name: String, engine: Engine)
  case class Character(name: String, spaceShip: SpaceShip)

  case class Queries(
//    character: SpaceShip => Task[Character] // works
    character: Character => Task[Character] // does not work
  )

  val interpreter: GraphQL[Any, Queries, Unit, Unit, CalibanError] =
    graphQL[Any, Queries, Unit, Unit](
      RootResolver(Queries(_ => ???))
    )
}
@fokot fokot changed the title Nested inputs Nested inputs do not return all types Nov 29, 2019
@ghostdogpr ghostdogpr added bug Something isn't working introspection labels Nov 29, 2019
@ghostdogpr
Copy link
Owner

@fokot Good find! This is clearly a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server Issue related to caliban server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants