You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, SwiftGraphQL only generates the layer that lets you express GraphQL queries using Swift language. It is widespread for developers to reuse some part of their schema in their application code.
We want to keep the model and the schema separated in the codebase. To get the best of both worlds, however, we could create a generator that would read the schema and generate boilerplate code that you may copy-paste into your Swift project.
It would contain the structure definition as well as the basic one-to-one selection set of all the fields in the model. To portray the idea, consider the following model:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, SwiftGraphQL only generates the layer that lets you express GraphQL queries using Swift language. It is widespread for developers to reuse some part of their schema in their application code.
We want to keep the model and the schema separated in the codebase. To get the best of both worlds, however, we could create a generator that would read the schema and generate boilerplate code that you may copy-paste into your Swift project.
It would contain the structure definition as well as the basic one-to-one selection set of all the fields in the model. To portray the idea, consider the following model:
This would generate
Beta Was this translation helpful? Give feedback.
All reactions