Skip to content

Running generator on swapi, getting compiler error #118

Closed Answered by maticzav
bvankuik asked this question in Q&A
Discussion options

You must be logged in to vote

From the top of my head, I think you need to make your query nullable.

let query = Objects.Root.starship(selection: starshipSelection.nullable)
client.query(query)

If you check the error you are getting

Cannot convert value of type 'Selection<MyService.MyStarship?, Objects.Starship>' to expected argument type 'Selection<MyService.MyStarship?, Objects.Starship?>'

It's saying that the TypeLock should be nullable but yours is not (the Objects.Starship vs Objects.Starship?).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bvankuik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants