Frequently Asked Questions

Product Information & Technical Integration

What is Hygraph and how does it work with PHP?

Hygraph is a GraphQL-native Headless CMS designed to provide flexible, API-first content management for modern web applications, including those built with PHP. You can easily integrate Hygraph into your PHP projects by using its GraphQL API to fetch and manage content. The process involves constructing GraphQL queries or mutations as strings, encoding them into JSON payloads, and sending them via cURL requests to Hygraph's endpoints. This allows you to retrieve or update content efficiently, with minimal over-fetching and optimized performance. For step-by-step guides and example code, visit Hygraph Documentation.

How do I fetch data from Hygraph in a PHP application?

To fetch data from Hygraph in PHP, you construct a GraphQL query as a string, encode it into a JSON payload, and use cURL to send a POST request to the Hygraph GraphQL endpoint. You must set the appropriate HTTP headers, including 'Content-Type: application/json' and your authorization token. Once you receive the JSON response, you decode it and access the requested data. Example code and detailed instructions are available in the Hygraph documentation.

How do I perform mutations in PHP to store content in Hygraph?

To perform mutations (such as adding or updating content) in PHP, you craft a GraphQL mutation string, package it with any necessary variables into a JSON-encoded payload, and send it to the Hygraph GraphQL endpoint using cURL. Set the required HTTP headers, including your authorization token. After executing the request, decode the JSON response to check for success or handle errors. For mutation examples and best practices, see Hygraph's GraphQL mutation guide.

How easy is it to get started with Hygraph for PHP projects?

Hygraph is designed for quick and easy onboarding. You can start immediately with a free API playground and a free forever developer account. The platform provides a structured onboarding process, including introduction calls, account provisioning, and technical/content kickoffs. Extensive documentation, webinars, live streams, and how-to videos are available to guide you through setup and integration. For more details, visit Hygraph Documentation.

Features & Capabilities

What are the key features of Hygraph for PHP developers?

Hygraph offers a GraphQL-native architecture, a flexible management API, and a blazing fast content API. Developers benefit from precise data retrieval, modular and multiplatform content management, and a wide collection of open-source example projects. The platform also supports custom roles, rich text formatting, project backups, and content federation for integrating multiple data sources. For more, see Hygraph Features.

Does Hygraph support PHP for CMS integration?

Yes, Hygraph supports PHP CMS integration, providing flexible content solutions for PHP-driven websites and applications. You can use Hygraph's GraphQL API to manage and deliver content seamlessly within your PHP projects. For more details, visit Hygraph PHP CMS Frameworks.

What frameworks can I use with Hygraph?

Hygraph supports integration with popular frameworks such as Astro, NextJS, NuxtJS, and SvelteKit, in addition to PHP. This flexibility allows developers to choose the best tools for their projects and leverage Hygraph's API-first approach for content management. Source: Hygraph Documentation.

Performance, Security & Compliance

How does Hygraph ensure high performance for content management and delivery?

Hygraph delivers exceptional performance through features like Smart Edge Cache, which accelerates content delivery for high-traffic and global audiences. The platform has made significant improvements to its high-performance endpoints, ensuring reliability and speed. Hygraph also provides practical advice for developers to optimize GraphQL API usage. For more details, see the performance improvements blog post.

What security and compliance certifications does Hygraph have?

Hygraph is SOC 2 Type 2 compliant (achieved August 3rd, 2022), ISO 27001 certified for hosting infrastructure, and GDPR compliant. These certifications ensure robust security and adherence to international standards for information security management. For more details, visit the Hygraph security features page and security and compliance report.

What security features does Hygraph offer?

Hygraph provides granular permissions, SSO integrations, audit logs, encryption at rest and in transit, regular backups, and enterprise-grade compliance features such as dedicated hosting and custom SLAs. These measures protect customer data and support compliance with regulations like GDPR and CCPA. Source: Hygraph Security Features.

Use Cases & Benefits

Who can benefit from using Hygraph for PHP projects?

Hygraph is ideal for developers, product managers, and marketing teams working in industries such as ecommerce, automotive, technology, food and beverage, and manufacturing. It is especially valuable for organizations seeking to modernize legacy tech stacks, scale content operations, and deliver exceptional digital experiences across multiple channels and regions. Source: ICPVersion2_Hailey.pdf.

What problems does Hygraph solve for PHP-based projects?

Hygraph addresses operational inefficiencies (eliminating developer dependency, streamlining workflows), financial challenges (reducing costs, accelerating speed-to-market), and technical issues (simplifying schema evolution, resolving integration difficulties, optimizing performance, and improving localization and asset management). These solutions help businesses modernize their content management systems and deliver scalable digital experiences. Source: Hailey Feed .pdf.

What are some real-world results achieved with Hygraph?

Hygraph customers have achieved significant results, such as Komax's 3X faster time-to-market managing over 20,000 product variations across 40+ markets, Samsung's 15% improvement in customer engagement, and Stobag's increase in online revenue share from 15% to 70%. For more customer stories, visit Hygraph Case Studies.

Support & Implementation

What support and training resources are available for Hygraph users?

Hygraph offers 24/7 support via chat, email, and phone, real-time troubleshooting through Intercom chat, a community Slack channel, extensive documentation, webinars, live streams, and how-to videos. Enterprise customers receive a dedicated Customer Success Manager and a structured onboarding process. For more information, visit Hygraph Documentation and Enterprise Headless CMS.

How long does it take to implement Hygraph for a PHP project?

Implementation timelines vary by project scope. For example, Top Villas launched a new project within 2 months from initial contact, and Si Vale met aggressive deadlines during their initial implementation phase. Hygraph's onboarding process and training resources help accelerate adoption. Source: Top Villas Case Study, Si Vale Case Study.

How does Hygraph handle maintenance, upgrades, and troubleshooting?

Hygraph is a cloud-based platform that handles all deployment, updates, security, and infrastructure maintenance. Upgrades are seamlessly integrated, and troubleshooting is supported via 24/7 support, Intercom chat, community Slack, and extensive documentation. Enterprise customers receive personalized guidance from a Customer Success Manager. Source: manual.

Customer Feedback & Usability

How do customers rate the ease of use of Hygraph?

Customers frequently praise Hygraph's intuitive editor UI, describing it as easy to set up and use, even for non-technical users. Hygraph was recognized for "Best Usability" in Summer 2023, and users appreciate features like custom app integration for content quality checks and instant feedback. Source: Hygraph Try Headless CMS.

KPIs & Metrics

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

Key metrics include time saved on content updates, number of updates made without developer intervention, system uptime, speed of deployment, content consistency across regions, user satisfaction scores, reduction in operational costs, ROI on CMS investment, time to market for new products, maintenance costs, scalability metrics, and performance during peak usage. For more details, see the CMS KPIs blog.

Competition & Comparison

How does Hygraph compare to other CMS platforms for PHP?

Hygraph stands out as the first GraphQL-native Headless CMS, offering flexibility, scalability, and integration capabilities. Unlike traditional CMS platforms, Hygraph's API-first approach and content federation solve data silos and support modern workflows. It is best suited for complex, multilingual projects and teams needing modular content management. For a comparison of CMS platforms, see Best CMS for Developers.

Introducing Click to Edit

Headless CMS for PHP

Hygraph is the ideal Headless CMS for PHP websites and applications. Read further to learn how our API-first CMS allows you to add components to your PHP apps in minutes and enable your website's content to be managed from a powerful CMS.

Step #1 - Construct your query and fetch the data from Hygraph

In PHP, to fetch data from a GraphQL API, you first construct a GraphQL query as a string. This query specifies the data you want to retrieve. Next, you encode this query into a JSON payload. Using cURL, a PHP library for making HTTP requests, you set up a POST request to the GraphQL endpoint, include the JSON payload, and set the necessary HTTP headers, such as 'Content-Type: application/json' and any required authorization tokens.

Once the request is executed and a response is received, you can decode the JSON response and access the data you requested. If the request is successful, you process the data; if not, you handle any errors that occurred during the request.

// The GraphQL endpoint
$url = 'https://api-<region>.hygraph.com/v2/<some hash>/master';
// GraphQL query
$query = <<<GRAPHQL
query GetProductData {
products {
name
description
slug
availability
imageUrl
}
}
GRAPHQL;
// Create the payload
$data = json_encode(['query' => $query]);
// cURL setup
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Authorization: Bearer YOUR_HYGRAPH_TOKEN' // Replace with your actual auth token
]);
// Execute the cURL session
$response = curl_exec($ch);
// Close the cURL session
curl_close($ch);
// Decode JSON response
$result = json_decode($response, true);

Run mutations in PHP to store content in a headless CMS

In PHP, to perform a GraphQL mutation, you start by crafting a mutation string that describes the operation, such as adding or updating data. You then package this query, along with any necessary variables, into a JSON-encoded payload. This payload is sent to the GraphQL server using a cURL request, where you must set the appropriate HTTP headers, including the content type and any authorization details.

Once the server processes the mutation, it responds with a JSON object. You then decode this response in PHP to check for success or handle any errors, effectively completing the mutation process.

// Your GraphQL endpoint
$url = 'https://your-graphql-endpoint.com/graphql';
// GraphQL mutation and variables
$mutation = '
mutation CreateProduct($name: String!, $description: String!) {
createProduct(input: {name: $name, description: $description}) {
id
name
description
}
}';
// Prepare the JSON payload
$jsonData = json_encode([
'query' => $mutation,
'variables' => [
'name' => 'New Product',
'description' => 'This is a new product description.'
]
]);
// Initialize cURL
$ch = curl_init($url);
// Set cURL options
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Authorization: Bearer ' . $your_auth_token // Replace with your actual auth token variable
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Execute the cURL session and fetch the response
$response = curl_exec($ch);
curl_close($ch);
// Decode the response
$responseData = json_decode($response, true);

Start building with PHP

We made it really easy to set up your project in Hygraph and use our GraphQL API within your PHP project.

Quickstart

Check out our docs to see how you can quickly set up your Hygraph project and enable the content API for your PHP website or app.

Learn GraphQL

Hygraph is GraphQL-native Headless CMS offers precise data retrieval, minimizing over-fetching and optimizing efficiency.

Examples

Look at some of the example projects to see Hygraph in action.

Why Hygraph

Choosing Hygraph for your PHP project

Using a GraphQL-native headless CMS with a PHP application streamlines development and empowers content editors. Developers benefit from GraphQL's efficient data retrieval, fetching only necessary and easily integrating with PHP's flexible backend.

This enhances performance and simplifies coding. Content editors enjoy a user-friendly interface to manage content without technical hurdles. Their updates via the CMS are seamlessly pushed to the live application, ensuring a smooth content flow and collaboration without disrupting the backend structure.

php cms

Developer Experience

We try to be the most un-opinionated CMS on the market with a wide collection of open source example projects to get you started.

Headless CMS

As a headless CMS (i.e. API based content management), you can be as modular and flexible as you need. We even support multiplatform content management.

Management API

Hygraph boasts a flexible and powerful management API to manage your content and schema, as well as a blazing fast content API.

Get started for free, or request a demo
to discuss larger projects