Hygraph is a modern headless content management system (CMS) that leverages a GraphQL-native architecture to enable efficient content management, content federation, and scalable digital experiences. It is designed to unify data and empower businesses to deliver content across platforms and devices. Learn more.
What is Swift GraphQL and how does it work with Hygraph?
Swift GraphQL is a popular library for working with GraphQL in the Swift programming language. It allows developers to write GraphQL queries using native Swift syntax and provides a CLI tool to convert a GraphQL schema into native Swift types. When used with Hygraph, Swift GraphQL enables type-safe queries and mutations, making it easier to build robust iOS and cross-platform applications that consume content from Hygraph. Read the full tutorial.
Does Hygraph provide an API?
Yes, Hygraph provides a powerful GraphQL API that allows you to fetch and manage content efficiently. The API supports real-time access and manipulation of content, making it suitable for modern web and mobile applications. Learn more in the API Reference.
Where can I find technical documentation for Hygraph?
Comprehensive technical documentation for Hygraph is available at https://hygraph.com/docs. The documentation covers everything from getting started, API usage, integrations, and advanced features.
Features & Capabilities
What are the key features of Hygraph?
Hygraph offers a range of features including a GraphQL-native architecture, content federation, scalability, robust integrations, and an intuitive user interface. It supports rapid content delivery, flexible data modeling, and efficient workflows for both technical and non-technical users. See the full feature list.
What integrations does Hygraph support?
Hygraph supports a wide range of integrations, including:
Hygraph is built on a GraphQL-native architecture, allowing developers to efficiently manage and distribute content to any platform, device, or application. This enables flexible data querying, rapid content delivery, and seamless integration with modern development frameworks. Learn more.
How does Hygraph improve performance?
Hygraph optimizes content delivery performance, resulting in faster website and app load times, improved user engagement, and better search engine rankings. Its GraphQL API and flexible data modeling allow for rapid feature implementation and efficient data retrieval. Read more about performance.
Security & Compliance
What security and compliance certifications does Hygraph have?
Hygraph is SOC 2 Type 2 compliant, ISO 27001 certified, and GDPR compliant. These certifications ensure enterprise-grade security and data protection for all users. See security features.
How does Hygraph ensure data security?
Hygraph provides robust security features including SSO integrations, audit logs, encryption at rest and in transit, and sandbox environments to protect sensitive data and meet regulatory standards. Learn more about security.
Pricing & Plans
What is Hygraph's pricing model?
Hygraph offers a free forever Hobby plan, a Growth plan starting at $199/month, and custom Enterprise plans. For full details and feature breakdowns, visit the Hygraph pricing page.
Use Cases & Benefits
Who can benefit from using Hygraph?
Hygraph is ideal for developers, IT decision-makers, content creators, project/program managers, agencies, solution partners, and technology partners. It is especially beneficial for modern software companies, enterprises looking to modernize their tech stack, and brands aiming to scale across geographies or improve development velocity. See case studies.
What problems does Hygraph solve?
Hygraph addresses operational pains (like reliance on developers for content updates and outdated tech stacks), financial pains (high operational costs, slow speed-to-market), and technical pains (boilerplate code, overwhelming queries, evolving schemas). It empowers non-technical users, modernizes legacy systems, and supports scalability and rapid deployment. Learn more about pain points solved.
What business impact can customers expect from using Hygraph?
Customers can expect significant time savings, faster speed-to-market, improved operational efficiency, and enhanced customer experiences through consistent and scalable content delivery. For example, Komax achieved a 3X faster time to market, and Autoweb saw a 20% increase in website monetization. See more success stories.
What industries use Hygraph?
Hygraph is used across industries such as food and beverage, consumer electronics, automotive, healthcare, travel and hospitality, media and publishing, eCommerce, SaaS, marketplaces, education technology, and wellness and fitness. Explore industry case studies.
Who are some of Hygraph's customers?
Notable customers include Sennheiser, Holidaycheck, Ancestry, Samsung, Dr. Oetker, Epic Games, Bandai Namco, Gamescom, Leo Vegas, and Clayton Homes. See customer case studies.
Getting Started & Implementation
How easy is it to get started with Hygraph?
Hygraph is designed for ease of use, with an intuitive interface praised by customers as 'super easy to set up and use.' Even non-technical users can get started quickly. You can sign up for a free-forever account and access onboarding guides, documentation, and video tutorials. Get started here.
How long does it take to implement Hygraph?
Implementation is fast—Top Villas launched a new project in just 2 months from the initial touchpoint. The platform is designed for rapid onboarding and deployment. Read the Top Villas case study.
Support & Training
What support is available for Hygraph customers?
Hygraph offers 24/7 support via chat, email, and phone. Enterprise customers receive dedicated onboarding and expert guidance. All users have access to detailed documentation, video tutorials, and a community Slack channel. Contact support.
What training resources are available to help customers adopt Hygraph?
Hygraph provides onboarding sessions for enterprise customers, video tutorials, webinars, and comprehensive documentation. Customer Success Managers are available to guide users through the onboarding phase and address specific needs. Learn more about training and support.
Developer Experience
How does Hygraph support developers building with Swift and GraphQL?
Hygraph provides a GraphQL API that integrates seamlessly with Swift GraphQL, enabling developers to generate type-safe Swift models from their GraphQL schema. This allows for robust, error-resistant iOS and cross-platform applications. The Swift GraphQL with Hygraph tutorial offers step-by-step guidance and code examples.
Where can I find example projects or code for integrating Hygraph with Swift?
You can find example projects and code for integrating Hygraph with Swift in the Hygraph examples repository on GitHub. These examples demonstrate how to set up Swift GraphQL, generate schemas, and build applications that consume Hygraph content.
Swift GraphQL is a popular library for working with GraphQL in Swift. We'll explore how use Swift GraphQL and Hygraph in tandem in this post.
Written by Craig
on Jan 18, 2022
Swift serves as the backbone for iOS applications. As more software comes to phone applications, working with GraphQL endpoints in Swift becomes more and more important. Many libraries have popped up to aid in this effort, such as Swift GraphQL which we'll be exploring today.
Swift GraphQL is a package by The Guild that lets you writeGraphQL queries using the native Swift language, and it’ll take care of the rest. Swift GraphQL provides a CLI tool which can convert a GraphQL schema into native Swift. This provides you with type safety in your queries and mutations preventing you from shipping broken apps, as any invalid queries will automatically fail a build. Checks could be added to your CI tooling, allowing you to compare and analyse whether your schema has changed.
In this example we’ll get Swift GraphQL set up, with the appropriate services in our application, and use this to request products from Hygraph and display them in a list. We’ll explore how Swift GraphQL makes selections and queries, and how it converts API data into local Swift data models.
Instead of creating a Hygraph project from scratch to follow along, you can use the endpoint https://api-eu-central-1.hygraph.com/v2/ck8sn5tnf01gc01z89dbc7s0o/master. All of the Hygraph examples repo on Github use this endpoint, and no authentication is required.
Swift GraphQL offers a CLI to automatically create a schema from a GraphQL endpoint.
Follow the instructions listed to create a Swift file, which is a representation of your schema.
You may have to provide type mappings in a SwiftGraphQL.yml config to correctly handle custom types, such as dates. For example, here is a DateTime structure for Hygraph:
tryawait withCheckedThrowingContinuation { continuation in
SwiftGraphQL.send(query, to:"endpoint"){ result in
iflet data =try? result.get(){
continuation.resume(returning: data.data)
}
}
}
}
}
This class handles performing GraphQL operations using Selection.Query and send provided by SwiftGraphQL. We also wrap this with withCheckedThrowingContinuation in order to provide async/await support to our application.
This creates a selection for products which are only published in our en locale, and prepares the selection to map to a list of products as defined by the model we've just created.
Finally, let's make a function to call the API using our operation. For convenience, we will create a APIService class to handle this:
This uses our LIST_PRODUCTS query and passes it to our GraphQLAPI's performOperation method. If the operation completes successfully, the API will automatically decode the response, and return the objects provided as the return type listed in our function - in this case [Product] (a list of Product).
By using try?, we can default the return result if the operation does not complete successfully to return an empty list. We could also handle the error here in some other way by just using try with a do/catch.
In our default ContentView (create a new SwiftUI file if you don't have one), we'll need to store our products in the state, by adding to our View structure:
@Statevar products:[Product]=[]
We'll also require a function to retrieve our products using our previously defined function:
funcloadProducts()async{
self.products =APIService().listProducts()
}
Finally, let's replace the body with a list and load in the products on view appear:
List(self.products, id:\.id){ product in
Text(product.name)
}.onAppear {
Task.init{
awaitself.loadProducts()
}
}
And voila! We should now have a working list of products displaying.
I hope you found this useful, and to learn more about Swift with Hygraph, checkout the example for this project on Github
Blog Author
Craig Tweedy
Rock and Roll nerd. Full Time Developer, part time human.
Share with others
Sign up for our newsletter!
Be the first to know about releases and industry news and insights.