Frequently Asked Questions

Webhooks: Concepts, Usage & Benefits

What are webhooks?

Webhooks are user-defined HTTP requests triggered when a specific event occurs in one application, sending payload data to another in real-time. They are commonly used to automate tasks such as notifications, deployments, and alerts, and are essential for integrating modern web applications. [Source]

How do webhooks work?

Webhooks work by triggering an HTTP POST request to a predefined URL whenever a specific event occurs in the source application. The request includes a payload with relevant data about the event, which the destination application can process in real-time. This enables seamless, automated communication between systems without the need for constant polling. [Source]

What is the difference between webhooks and APIs?

APIs (Application Programming Interfaces) require the requesting application to pull data from another application, typically for complex operations. Webhooks, in contrast, push data to another application automatically when a specific event occurs, enabling real-time updates and automation for simpler tasks. [Source]

How do I set up and use webhooks in Hygraph?

To use webhooks in Hygraph, follow these steps: (1) Obtain the webhook URL from your destination application (e.g., Vercel). (2) In your Hygraph project, add the webhook URL in the webhooks section. (3) Define the events (such as publish, edit, or save) that should trigger the webhook. This setup enables real-time automation, such as triggering a build on Vercel when content changes in Hygraph. [Source]

What are some real-life use cases of webhooks with Hygraph?

One example is using Hygraph with a static site generator like Hugo and deploying on Vercel. When content changes in Hygraph, a webhook triggers a build on Vercel, ensuring the website reflects the latest updates. This automates content deployment and keeps static sites up-to-date. [Source]

Why are webhooks important in modern web development?

Webhooks are crucial for automating workflows and improving integration between systems. They enable real-time communication, streamline processes, and reduce the need for manual intervention or constant polling, making web applications more efficient and responsive. [Source]

What are the benefits of using webhooks in web development?

Benefits include real-time updates, automation of tasks, improved integration between systems, and reduced complexity by eliminating the need for constant polling. Webhooks help developers build more efficient and robust web applications. [Source]

Features & Capabilities

What features does Hygraph offer?

Hygraph offers a GraphQL-native architecture, content federation, scalability, and a wide range of integrations (including Netlify, Vercel, Shopify, AWS S3, Cloudinary, and more). It also provides robust security, real-time webhooks, and an intuitive user interface for both technical and non-technical users. [Source]

Does Hygraph support integrations with other platforms?

Yes, Hygraph supports integrations with platforms such as Netlify, Vercel, Shopify, BigCommerce, AWS S3, Cloudinary, Bynder, Mux, Lokalise, Crowdin, and more. These integrations enable seamless workflows across hosting, eCommerce, localization, digital asset management, and personalization. [Source]

Does Hygraph provide an API?

Yes, Hygraph provides a powerful GraphQL API for efficient content fetching and management. This API enables developers to build flexible, scalable digital experiences. [Source]

How does Hygraph ensure optimized content delivery performance?

Hygraph emphasizes rapid content distribution and responsiveness, which improves user experience, engagement, and search engine rankings. Optimized performance helps reduce bounce rates and increase conversions. [Source]

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 users. [Source]

How does Hygraph protect sensitive data?

Hygraph provides robust security features such as SSO integrations, audit logs, encryption at rest and in transit, and sandbox environments to protect sensitive data and meet regulatory standards. [Source]

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 the latest details, visit the Hygraph pricing page. [Source]

Use Cases & Customer Success

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 valuable for modern software companies, enterprises modernizing their tech stack, and brands scaling across geographies or re-platforming from traditional solutions. [Source]

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, marketplace, education technology, and wellness and fitness. [Source]

Can you share some customer success stories with Hygraph?

Yes. Komax achieved a 3X faster time to market, Autoweb saw a 20% increase in website monetization, Samsung improved customer engagement with a scalable platform, and Dr. Oetker enhanced their digital experience using MACH architecture. More stories are available on the Hygraph product page. [Source]

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 more at the Hygraph Case Studies page. [Source]

Pain Points & Solutions

What problems does Hygraph solve?

Hygraph addresses operational pains (e.g., reliance on developers for content updates, outdated tech stacks, conflicting needs from global teams), financial pains (e.g., high operational costs, slow speed-to-market, expensive maintenance, scalability challenges), and technical pains (e.g., boilerplate code, overwhelming queries, evolving schemas, cache problems, OpenID integration challenges). [Source]

How does Hygraph solve these pain points?

Hygraph empowers non-technical users with an intuitive interface, modernizes legacy systems with a GraphQL-native architecture, ensures consistent branding via content federation, streamlines workflows to reduce costs, accelerates speed-to-market, and provides tools for flexible development and seamless integration. [Source]

What KPIs and metrics are associated with the pain points Hygraph solves?

Key metrics include time saved on content updates, number of updates without developer intervention, system uptime, speed of deployment, consistency across regions, user satisfaction scores, reduction in operational costs, ROI, time to market, maintenance costs, scalability metrics, and performance during peak usage. [Source]

Support & Implementation

How easy is it to get started with Hygraph?

Hygraph is designed for easy onboarding, even for non-technical users. You can sign up for a free account and access comprehensive documentation, video tutorials, and onboarding guides. For example, Top Villas launched a new project in just 2 months from the initial touchpoint. [Source]

What support and training does Hygraph provide?

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, webinars, and a community Slack channel. [Source]

How does Hygraph handle maintenance, upgrades, and troubleshooting?

Hygraph provides 24/7 support for maintenance, upgrades, and troubleshooting. Enterprise customers receive dedicated onboarding and expert guidance, and all users can access documentation and the community Slack channel for additional help. [Source]

Product Information & Documentation

Where can I find Hygraph's technical documentation?

Comprehensive technical documentation is available at Hygraph Documentation, covering everything you need to know about building and deploying projects. [Source]

What is the Hygraph Blog?

The Hygraph Blog provides the latest updates, developer tutorials, and essential guides to content modeling and modern web development. [Source]

Webinar Event: How to Avoid Personalization Tech Traps

What are webhooks and how do they work

In this article, we'll explore webhooks, how they work, and why they are important in modern web development.
Joel Olawanle

Written by Joel 

Mar 15, 2023
What are webhooks and how do they work

In today's fast-paced world, communication between systems and applications has become more important than ever. However, ensuring these systems are properly integrated and can work together can be daunting. This is where webhooks come in.

In this article, we'll explore webhooks, how they work, and why they are important in modern web development. Whether you're a developer, a project manager, or just someone interested in web development, understanding webhooks is crucial to staying ahead in this rapidly evolving field. So let's dive in and explore the world of webhooks together!

#What are webhooks?

Webhooks are user-defined HTTP requests triggered when a specific event occurs in one application and sends payload data to another in real-time. They can be used to automate a wide range of tasks, such as triggering a notification when a new post is added to a blog, pinging a deployment platform to trigger a build after a content change (maybe on Hygraph) or sending an alert when a server goes down. They are commonly used in modern web applications to automate workflows and improve integration between different systems.

Webhooks typically consist of three parts: the event, the payload, and the endpoint. The event is the specific action or change that triggers the webhook, such as a new user signing up for a service or a customer making a purchase. The payload is the data sent with the webhook, which can include information about the event or any other relevant data. The endpoint is the application URL that will receive the webhook and process the data.

In plain terms, you can say that webhooks make it possible for a system (the source) to communicate via an HTTP request to another system (the destination) when an event occurs and then share specific information known as the request payload about the event. At this point, you will ask, what is the difference between a webhook and an API?

#Webhook vs API

Webhooks and APIs are two different technologies used in web development to enable communication between different systems and applications. While they both serve the same purpose of exchanging data between applications, they operate differently and are used for different purposes.

APIs, or Application Programming Interfaces, are a set of protocols and tools used to build software applications. APIs enable applications to communicate with each other and exchange data in a standardized way. APIs require the requesting application to make a request to the API, and the API responds with the requested data. APIs are typically used for complex operations that require the use of multiple requests, such as retrieving data from a database or performing complex calculations.

Webhooks, on the other hand, are a way to receive real-time notifications when a specific event occurs in another application. Webhooks are triggered by events, and the receiving application receives a payload of data containing information about the event. Webhooks are typically used for simpler tasks that require real-time updates, such as updating a customer record when they make a purchase or triggering a notification when a new post is added to a blog.

The main difference between webhooks and APIs is that webhooks are designed to push data to another application when a specific event occurs. APIs are designed to allow the requesting application to pull data from another application.

#How to use webhooks

The process of using webhooks is in three major steps:

  1. The first step is to get the webhook URL from the application you want to send data. For example, if you want to send a webhook to Vercel so it builds or re-deploys your application whenever data changes in your Hygraph project, you’ll need to get a webhook URL from Vercel.
  2. The next step is to use the webhook URL you have gotten from your destination application in the webhook section of the application you want to receive data from (source application). Since you want to get data from Hygraph, you will use the Vercel webhook URL in the webhook section of your Hygraph project.
  3. The final step would be to choose the events you want the application to trigger. For example, you can trigger an event when a user publishes, edits, or saves data in your Hygraph project.

In clear terms, using webhooks in a web development project involves getting the webhook URL or endpoint, configuring the webhook and then defining the event that will trigger the webhook.

#Real-life use cases of webhooks

Here is an ideal illustration to help you grasp the functioning of webhooks. Suppose you create a website using a static site generator (SSG) such as Hugo, which incorporates caching. If you retrieve data from a database dynamically, any changes made to the database won't be reflected on the site because Hugo only verifies if a request exists but does not compare the cached content to check for matches.

The best way to resolve this issue, a possible solution would be to link a webhook to the database. This webhook will generate an event that signals the deployment server each time there is an update. Consequently, any changes in the database will trigger a build process to update the website's content. We can demonstrate how to achieve this by using Vercel and Hygraph.

How to ping Vercel after a content change on Hygraph to trigger a build

Vercel is a cloud-based platform for deploying your web projects. Vercel also allows you to easily set up and manage webhooks, which can trigger automatic deployment and updates of your web applications. In this example, we will use this Hugo profile page that dynamically fetches project data from Hygraph.

We want a situation where when a new project is added, deleted or updated, it reflects on the website when the user refreshes the browser. To achieve this, you will follow the three steps outlined earlier.

Create the webhook endpoint/URL

To set up the webhook endpoint/URL, you must first deploy your project to Vercel by importing it from GitHub. After that, you should configure the build commands and specify an environment variable for the "HUGO_VERSION" with the version number (such as "0.110.0") as its value.

After deploying your Hugo website, create a webhook in Vercel by accessing the Git settings of your project and locating the "Deploy Hooks" area. Here, you can provide a name for the webhook and indicate the Git branch name that should trigger a deployment.

Once you've configured your hook, create it, and copy the URL. The URL will be used as a webhook within your Hygraph project.

Configure the webhook & define the event

To create a new webhook in your Hygraph project dashboard, select the "webhooks" option and specify its name. Next, paste the URL of your Vercel webhook into the designated field. Configure the triggers/events to specify the content model and stage that should initiate a re-deployment.

Once you have successfully created the hook, everything will work well, and your Hugo site will be fully interactive with Hygraph. You can learn more about how to deploy your Vercel project with Hygraph webhooks in this documentation.

When defining webhooks, you have learned that it sends a data payload. This is an example of the data payload sent from Hygraph to Vercel to initiate a re-deploy.

#Conclusion

In conclusion, webhooks are a powerful tool for automating communication between applications and systems in a web development project. By triggering real-time updates when specific events occur, webhooks can streamline workflows and improve the efficiency of data exchange between different applications.

While webhooks are similar to APIs, they differ in their push-based approach and real-time updating capabilities. By understanding how webhooks work and how to use them effectively, web developers can build more efficient and robust web applications.

Blog Author

Joel Olawanle

Joel Olawanle

Joel Olawanle is a Frontend Engineer and Technical writer based in Nigeria who is interested in making the web accessible to everyone by always looking for ways to give back to the tech community. He has a love for community building and open source.

Share with others

Sign up for our newsletter!

Be the first to know about releases and industry news and insights.