Hacker Newsnew | past | comments | ask | show | jobs | submit | maticzav's commentslogin

i love the idea!

i know that https://expand.ai/ is doing something similar, maybe worth checking out


Thanks! That helps a lot. Can you maybe recommend any good starting points besides just searching the internet for each of the keywords you mentioned?


I learned adhoc at work, so unfortunately don’t have any good recommendations.


Thank you for adding the links!

The main difference between these clients and SwiftGraphQL is that SwiftGraphQL tries to abstract away GraphQL in favour of Swift language feature.

`relay-swift`, for example, relies on query strings which doesn't bring type-safety to your code;

`graphaello` is indeed very similar and I've tried using it before creating SwiftGraphQL. One of the goals of SwiftGraphQL was to let you easily separate the model from your queries. That's why we let you do complex logic in the selection itself. Otherwise, you'd have to first create a utility struct and then translate it into a model-type. I think that's the main difference between graphaello and SwiftGraphQL

Thanks again for sharing the links!


Relay.swift doesn't bring type-safety to your queries but it does use the relay-compiler which will fail if anything is wrong (at least helpful!) and you still get type safety for results as well as automatic conformance to Identifiable & custom scalar type substitutions.

Haven't checked out SwiftGraphQL much, but Relay.swift is definitely the best swift based GQL I have used to date.


SwiftGraphQL also generates API structs from the schema.

Maybe you are referring to generating the model from the queries. The problem we had with that approach was that it's hard to reuse the generated structures in your application model. You can read more about the idea here:

https://github.com/maticzav/swift-graphql#what-are-the-pitfa...


SwiftGraphQL was actually inspired by Elm GraphQL! Dillon - the creator of Elm GraphQL - even helped me understand a couple of concepts he used in that library that we also use in SwiftGraphQL.


A must see for every frontend engineer working with GraphQL!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: