A GraphQL client that lets you forget about GraphQL.

What's New

SwiftGraphQL 4.0.0


4.0.0 (2022-08-04)

Performance Improvements

  • package: Add Query Builder Methods to WebSocketClient (#84) (9252d5d)


  • package: This commit changes how we process the failure of query-builder decoding extensions. We no longer add the parsing error to the result but instead throw the error and pass it down the publisher chain.

A GraphQL client that lets you forget about GraphQL.

CI Tests



  • Intuitive: You'll forget about the GraphQL layer altogether.
  • 🏖 Time Saving: I've built it so you don't have to waste your precious time.
  • ☝️ Generate once: Only when your schema changes.
  • ☎️ Subscriptions: Listen to subscriptions using webhooks.
  • 🏔 High Level: You don't have to worry about naming collisions, variables, anything. Just Swift.


SwiftGraphQL is a GraphQL Client that ships with a type-safe query builder. It lets you perform queries, mutations and listen for subscriptions. The query builder guarantees that every query you can create is valid and complies with the GraphQL spec.

The library is centered around three core principles:

  • 🚀 If your project compiles, your queries work.
  • 🦉 Use Swift in favour of GraphQL wherever possible.
  • 🕊 Packages shouldn't lock you in to the "framework".

You can use only parts of SwiftGraphQL that are useful to you (e.g. use GraphQLWebSocket implementation but not the query builder, or WebSocket but not the client).


You can find detailed documentation on the SwiftGraphQL page at https://www.swift-graphql.com/.

Other Libraries

SwiftGraphQL solves a set of specific problems but it doesn't solve every problem. Depending on your needs, you may also want to check out

Thank you

I would like to dedicate this last section to everyone who helped develop this library.

  • First, I would like to thank Dillon Kearns, the author of elm-graphql, who inspired me to write the library, and helped me understand the core principles behind his Elm version.
  • Second, I would like to thank Peter Albert for giving me a chance to build this library, having faith that it's possible, and all the conversations that helped me push through the difficult parts of it.
  • Thirdly, special thanks to Phil Pluckthun who explained all the bits of how urql and wonka work,
  • Fourthly, thanks to Orta Therox for helping me navigate Combine.
  • Lastly, I'd like to thank every contributor to the project. SwiftGraphQL is better because of you. Thank you!

Thank you! 🙌


MIT @ Matic Zavadlal



  • Swift Tools 5.6.0
View More Packages from this Author


Last updated: Sat Aug 06 2022 03:01:28 GMT-0500 (GMT-05:00)