Live data from Hacker News

SwiftGraphQL – A GraphQL client that lets you forget about GraphQL

github.com

1–10 of 90 posts

Re: SwiftGraphQL – A GraphQL client that lets you forget about GraphQL

#4
There's also:

- Relay-swift: A port of Relay to Swift - https://relay-tools.github.io/Relay.swift/docs/

- Graphaello: Inspired by Relay, but deviates a bit more from the patterns than Relay-swift - https://github.com/nerdsupremacist/Graphaello

Re: SwiftGraphQL – A GraphQL client that lets you forget about GraphQL

#6
post #2

Wouldn't it be better to generate those structs from API schema?

I have the same opinion. The big problem I had with generating graphql api from code, was that the result graphql schema was badly done. It's hard to design API that way. I made similar module for typescript just to realize, that I don't want to build graphql endpoints this way.

that module: https://github.com/captain-refactor/graphql-compose-typescri...

Re: SwiftGraphQL – A GraphQL client that lets you forget about GraphQL

#9
post #5

I love code generation from GraphQL. Elm-graphql is a great example of this and works incredibly well, to the point where it sold me on GraphQL entirely.

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.

Re: SwiftGraphQL – A GraphQL client that lets you forget about GraphQL

#10
post #2

Wouldn't it be better to generate those structs from API schema?

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...

Post reply on HN