nerdsupremacist / Graphaello

A Tool for Writing Declarative, Type-Safe and Data-Driven Applications in SwiftUI using GraphQL

Home Page:https://graphaello.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Input Objects are not Properly translated to Apollo Types

nerdsupremacist opened this issue · comments

Apollo can only run the query with their types.
Despite the fact that our types are identical to theirs, we still need to convert.

Problematic areas:

We can't just run .init() as in the case with enums right now, because the Apollo type is only generated when it's being used by a query. So we can't always ship the init code

Possible Ideas:

  • Only generate the init code when the type is being used by a query
  • Maybe unsafeBitCast would do the job ¯\_(ツ)_/¯

Relevant areas:

Fixed this by no longer converting our types but instead just using type aliases when the types are used