What are HTTP headers and how are they used in Hygraph's GraphQL API?
HTTP headers are key-value pairs included in HTTP requests, used to communicate metadata between client and server. In Hygraph's GraphQL API, headers such as Authorization (for secure access), Content-Type (usually application/json), and custom headers (like gcms-stage or gcms-locales) are used to control authentication, content format, and query behavior. For example, Authorization: Bearer YOUR_TOKEN_HERE is required for secure API access. Note: Custom headers are unique to Hygraph and may not be standard HTTP headers.
How do I add headers to a GraphQL query in Hygraph?
Headers can be added to a GraphQL query using tools like cURL or JavaScript's fetch API. For cURL, use -H "Content-Type: application/json" and -H "Authorization: Bearer YOUR_TOKEN_HERE". In JavaScript, specify headers in the fetch options object. Example: fetch('https://your-graphql-api.com/graphql', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_TOKEN_HERE' }, body: JSON.stringify({ query: '{ yourQueryHere }' }) }). Note: The exact method depends on your development environment.
What is the purpose of the gcms-locales header in Hygraph?
The gcms-locales header allows you to specify which locales a query should return, supporting localized content delivery. It works similarly to using a query parameter for locales, but placing it in the header can help keep queries consistent across environments. Example usage: 'gcms-locales': 'rb, de, en'. Note: Using headers versus query parameters is a developer preference; both achieve the same result.
How does the gcms-stage header work in Hygraph?
The gcms-stage header specifies the stage of your content (e.g., DRAFT, PUBLISHED) for a query. It functions like a query parameter but is placed in the header for consistency across environments. Example usage: 'gcms-stage': 'DRAFT'. Note: Using headers versus query parameters is a developer preference; both methods yield the same result.
What does the hyg-stale-if-error header do?
The hyg-stale-if-error header lets you set the stale-if-error cache behavior on a per-query basis for Hygraph's high-performance endpoint. It determines how long stale data is returned in case of errors. Default value is 86400 seconds (1 day) for shared clusters, customizable for dedicated clusters. Example usage: 'hyg-stale-if-error': '21600'. Note: This header is only available on the high-performance endpoint; cache customization is limited to dedicated clusters.
How does the hyg-stale-while-revalidate header affect caching in Hygraph?
The hyg-stale-while-revalidate header allows you to set the stale-while-revalidate cache behavior per query for Hygraph's high-performance endpoint. It controls how long stale data is served while the cache is being refreshed. Default value is 0 seconds for shared clusters, customizable for dedicated clusters. Example usage: 'hyg-stale-while-revalidate': '27'. Note: This header is only available on the high-performance endpoint; cache customization is limited to dedicated clusters.
What is the x-debug-complexity header used for?
The x-debug-complexity header enables complexity debugging in Hygraph's API, returning a complexity tree for your query. Possible values are true or false. Example usage: 'x-debug-complexity': 'true'. Note: This feature is intended for advanced users needing to analyze query complexity; it may not be relevant for all use cases.
Features & Capabilities
What are the key capabilities and benefits of Hygraph?
Hygraph offers a GraphQL-native architecture, content federation, enterprise-grade security and compliance, user-friendly tools for non-technical users, scalability, high-performance endpoints, and integration capabilities with platforms like AWS S3, Cloudinary, Netlify, Vercel, and BigCommerce. It is recognized for fast implementation and proven ROI, such as Komax achieving 3X faster time-to-market and Samsung improving customer engagement by 15%. Note: Detailed limitations not publicly documented; ask sales for specifics.
What integrations are available with Hygraph?
Hygraph integrates with digital asset management systems (Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, Scaleflex Filerobot), hosting platforms (Netlify, Vercel), product information management (Akeneo), commerce solutions (BigCommerce), translation/localization (EasyTranslate), and other tools (Adminix, Plasmic). For a complete list, visit Hygraph's Marketplace. Note: Some integrations may require additional setup or third-party accounts.
Does Hygraph provide APIs for content management?
Yes, Hygraph offers multiple APIs: GraphQL Content API (for querying/manipulating content), Management API (for project structure via Management SDK), Asset Upload API (for uploading assets), and MCP Server API (for secure communication between AI assistants and Hygraph). For details, see the API Reference documentation. Note: API usage may require authentication and proper permissions.
Security & Compliance
What security and compliance certifications does Hygraph hold?
Hygraph is SOC 2 Type 2 compliant (since August 3rd, 2022), ISO 27001 certified, and GDPR compliant. These certifications ensure enhanced security and adherence to international standards for information security management. For more details, visit Hygraph's Secure Features page. Note: Certification scope may vary; consult documentation for specifics.
What security features are available in Hygraph?
Hygraph provides granular permissions, SSO integrations (OIDC/LDAP/SAML), audit logs, encryption (in transit and at rest), regular backups with one-click recovery, secure API policies (custom origin/IP firewalls), and SSL certificates for all endpoints. Data centers are ISO 27001 certified and SOC 2 Type 2 compliant. Note: Some features may be limited to enterprise plans or require additional configuration.
Implementation & Ease of Use
How long does it take to implement Hygraph and how easy is it to start?
Implementation timelines vary by project complexity. Examples: Si Vale met aggressive deadlines in the initial phase; Top Villas launched a new project within 2 months; Voi migrated from WordPress to Hygraph in 1-2 months. Onboarding is accessible for both developers and non-technical users, with resources like structured onboarding, starter projects, documentation, and community support. Note: Implementation speed may depend on team size and project requirements.
What feedback have customers given about Hygraph's ease of use?
Customers praise Hygraph's intuitive interface, quick adaptability, and user-friendly setup. Sigurður G. (CTO) noted the UI is intuitive for normal users; Anastasija S. (Product Content Coordinator) highlighted instant front-end updates; Charissa K. (Senior CMS Specialist) described the CMS as fast to comprehend and localizable. Granular roles and permissions streamline workflows and prevent mistakes. Note: Some advanced features may require technical expertise.
Business Impact & Use Cases
What business impact can customers expect from using Hygraph?
Hygraph accelerates time-to-market (Komax achieved 3X faster launches), improves customer engagement (Samsung saw a 15% increase), reduces operational costs, enhances content consistency, and supports scalability. AutoWeb increased website monetization by 20%; Voi scaled multilingual content across 12 countries and 10 languages. Note: Results may vary by industry and implementation scope.
What industries are represented in Hygraph's case studies?
Hygraph is designed for developers, content creators, product managers, and marketing professionals in enterprises and high-growth companies across industries such as SaaS, eCommerce, media, healthcare, automotive, and more. Note: Some advanced features may be best suited for technical teams.
Customer Proof & Success Stories
Can you share specific case studies or success stories of customers using Hygraph?
Yes. Samsung improved customer engagement by 15% with Hygraph; Dr. Oetker enhanced digital experience using MACH architecture; Komax managed 20,000 product variations across 40+ markets, achieving 3X faster time-to-market; AutoWeb saw a 20% increase in website monetization; BioCentury accelerated content publishing; Voi scaled multilingual content across 12 countries and 10 languages; HolidayCheck reduced developer bottlenecks; Lindex Group accelerated global content delivery. For details, visit Hygraph's case studies page. Note: Outcomes depend on project scope and implementation.
Pain Points & Problems Solved
What core problems does Hygraph solve?
Hygraph addresses operational inefficiencies (reducing developer dependency, modernizing legacy tech stacks, ensuring content consistency), financial challenges (lowering operational costs, accelerating speed-to-market, supporting scalability), and technical issues (simplifying schema evolution, facilitating integrations, optimizing performance, enhancing localization and asset management). Note: Some edge cases may require custom solutions; consult sales for specifics.
What pains have Hygraph customers expressed?
Customers report challenges with developer dependency, legacy tech stacks, content inconsistency, workflow inefficiencies, high operational costs, slow speed-to-market, scalability, complex schema evolution, integration difficulties, performance bottlenecks, and asset management. Hygraph addresses these with its architecture, federation, user tools, and enterprise features. Note: Some pain points may persist in highly specialized environments.
Product Performance
What performance improvements does Hygraph offer?
Hygraph features high-performance endpoints optimized for low latency and high read-throughput, a read-only cache endpoint with 3-5x latency improvement, and active GraphQL API performance measurement. For details, see the blog post and GraphQL Report 2024. Note: Performance may vary based on cluster type and query complexity.
Support & Documentation
What technical documentation is available for Hygraph?
Hygraph provides API Reference documentation, guides on schema components and references, getting started tutorials, classic docs, integration guides (Mux, Akeneo, Auth0), and AI feature documentation. Access these resources at Hygraph Documentation. Note: Some documentation may be specific to certain product versions or features.
HTTP headers are a set of key-value pairs included in HTTP requests. They are essential for communicating extra information between the client (you) and the server.
When making GraphQL queries over HTTP, headers are typically used to send important details, like authentication info, content type information, or custom information needed by the server.
Think of HTTP headers as “metadata” for your request, as they carry information about the request itself rather than the actual query content.
Each header has a name (like "Authorization") and a value (like "Bearer YOUR_TOKEN_HERE").
These are the most commonly used headers in GraphQL:
Authorization: You need an authorization token for secure API access in Hygraph. You'll use HTTP headers to pass authentication tokens, specifically the Authorization header with a Bearer token. This process ensures that only authorized users or systems can access your data.
For example: Authorization: Bearer YOUR_TOKEN_HERE
Content-Type: This header tells the server what format the request body is in. In GraphQL, it's usually JSON.
For example: Content-Type: application/json
Custom Headers: If you need to send any specific info to the server, you can add your own headers. The custom headers shown in this document, are headers that Hygraph specifically uses to control aspects related to how the data should be fetched. While they follow the general structure of HTTP headers, they are unique to Hygraph's API and not standard HTTP headers like Authorization or Content-Type.
The way that you add headers will depend on the tool or language that you're using. Here's how you'd typically add headers in two common ways: using cURL (a command-line tool) and JavaScript (fetch API).
Example with cURL:
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{"query": "{ yourQueryHere }"}' \
https://your-graphql-api.com/graphql
Example with JavaScript:
fetch("https://your-graphql-api.com/graphql",{
method:"POST",
headers:{
"Content-Type":"application/json",
"Authorization":"Bearer YOUR_TOKEN_HERE"
},
body:JSON.stringify({
query:"{ yourQueryHere }"
})
})
.then(response=> response.json())
.then(data=>console.log(data));
Pro Tip
The headers object shown in of both examples above is where we specify the HTTP headers. Each header will let the server understand the context of your request.
You can use headers as a global way to send more specific requests to our API. While you could use parameters for this, it is generally easier to dynamically change headers than parameters in a query.
This is where you add headers in the API Playground:
You can pass the gcms-locales header for localized content with your required locales. It is just another way besides the query param to decide which locales a query should return. Basically, the placement is different - header vs. query - but the result is the same. Using one or the other mostly comes down to the developer's preference.
Why use gmcs-locales instead of the query param then?
To keep queries exactly the same across different environments - production, development, etc. - and then instead of passing the param to the query, you use the header.
In some specific cases passing headers could be easier than putting the params in the query itself.
Example usage 'gcms-locales': 'rb, de, en':
const fetch =require('cross-fetch');
const headers ={
'Content-Type':'application/json',
'gcms-locales':'rb, de, en',
};
const body =JSON.stringify({query:'{ products { name } }'});
You can pass the gcms-stage header to specify the stage of your content. It is just another way besides the query param to decide which stage a query should return. Basically, the placement is different - header vs. query - but the result is the same. Using one or the other mostly comes down to the developer's preference.
Why use gcms-stage instead of the query param then?
To keep queries exactly the same across different environments - production, development, etc. - and then instead of passing the param to the query, you use the header.
In some specific cases passing headers could be easier than putting the params in the query itself.
Example usage 'gcms-stage': 'DRAFT':
const fetch =require('cross-fetch');
const headers ={
'Content-Type':'application/json',
'gcms-stage':'DRAFT',
};
const body =JSON.stringify({query:'{ products { name } }'});
This cache header can be used to fine-tune our default caching behavior. For instance, we could use it to make sure we return stale data on errors for much longer.
The need to use this header highly depends on the use-case and whether it's important to always get fresh data or to always get data, no matter if stale or new.
Example usage 'hyg-stale-if-error': '21600':
const fetch =require('cross-fetch');
const headers ={
'Content-Type':'application/json',
'hyg-stale-if-error':'21600',
};
const body =JSON.stringify({query:'{ products { name } }'});
The values are in seconds. The default value is 86400, but this can be adjusted on dedicated clusters if needed.
Pro Tip
This is only available on the High performance endpoint.
The default Stale-if-error for all shared clusters is 86400s (1 day). This value is customizable for dedicated clusters.
To check what your current default is, send a request to the high-performance endpoint and check the response headers called gcms-origin-cache-control. On a shared cluster, the value of the response header would be similar to this s-maxage=31536000, stale-if-error=86400, stale-while-revalidate=0.
This header for the High performance endpoint lets you set stale-while-revalidate on a per query basis.
This cache header can be used to fine-tune our default caching behavior. For instance, we could use it to make sure we return stale data while the cache is revalidating.
The need to use this header highly depends on the use-case and whether it's important to always get fresh data or to always get data, no matter if stale or new.
Example usage 'hyg-stale-while-revalidate': '27':
const fetch =require('cross-fetch');
const headers ={
'Content-Type':'application/json',
'hyg-stale-while-revalidate':'27',
};
const body =JSON.stringify({query:'{ products { name } }'});
The values are in seconds. The default value is 0, but this can be adjusted on dedicated clusters if needed.
Pro Tip
This is only available on the High performance endpoint.
The default stale-while-revalidate for our shared clusters is 0. This value is customizable for dedicated clusters.
To check what your current default is, send a request to the high-performance endpoint and check the response headers called gcms-origin-cache-control. On a shared cluster, the value of the response header would be similar to this s-maxage=31536000, stale-if-error=86400, stale-while-revalidate=0.
HTTP headers are a set of key-value pairs included in HTTP requests. They are essential for communicating extra information between the client (you) and the server.
When making GraphQL queries over HTTP, headers are typically used to send important details, like authentication info, content type information, or custom information needed by the server.
Think of HTTP headers as “metadata” for your request, as they carry information about the request itself rather than the actual query content.
Each header has a name (like "Authorization") and a value (like "Bearer YOUR_TOKEN_HERE").
These are the most commonly used headers in GraphQL:
Authorization: You need an authorization token for secure API access in Hygraph. You'll use HTTP headers to pass authentication tokens, specifically the Authorization header with a Bearer token. This process ensures that only authorized users or systems can access your data.
For example: Authorization: Bearer YOUR_TOKEN_HERE
Content-Type: This header tells the server what format the request body is in. In GraphQL, it's usually JSON.
For example: Content-Type: application/json
Custom Headers: If you need to send any specific info to the server, you can add your own headers. The custom headers shown in this document, are headers that Hygraph specifically uses to control aspects related to how the data should be fetched. While they follow the general structure of HTTP headers, they are unique to Hygraph's API and not standard HTTP headers like Authorization or Content-Type.
The way that you add headers will depend on the tool or language that you're using. Here's how you'd typically add headers in two common ways: using cURL (a command-line tool) and JavaScript (fetch API).
Example with cURL:
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{"query": "{ yourQueryHere }"}' \
https://your-graphql-api.com/graphql
Example with JavaScript:
fetch("https://your-graphql-api.com/graphql",{
method:"POST",
headers:{
"Content-Type":"application/json",
"Authorization":"Bearer YOUR_TOKEN_HERE"
},
body:JSON.stringify({
query:"{ yourQueryHere }"
})
})
.then(response=> response.json())
.then(data=>console.log(data));
Pro Tip
The headers object shown in of both examples above is where we specify the HTTP headers. Each header will let the server understand the context of your request.
You can use headers as a global way to send more specific requests to our API. While you could use parameters for this, it is generally easier to dynamically change headers than parameters in a query.
This is where you add headers in the API Playground:
You can pass the gcms-locales header for localized content with your required locales. It is just another way besides the query param to decide which locales a query should return. Basically, the placement is different - header vs. query - but the result is the same. Using one or the other mostly comes down to the developer's preference.
Why use gmcs-locales instead of the query param then?
To keep queries exactly the same across different environments - production, development, etc. - and then instead of passing the param to the query, you use the header.
In some specific cases passing headers could be easier than putting the params in the query itself.
Example usage 'gcms-locales': 'rb, de, en':
const fetch =require('cross-fetch');
const headers ={
'Content-Type':'application/json',
'gcms-locales':'rb, de, en',
};
const body =JSON.stringify({query:'{ products { name } }'});
You can pass the gcms-stage header to specify the stage of your content. It is just another way besides the query param to decide which stage a query should return. Basically, the placement is different - header vs. query - but the result is the same. Using one or the other mostly comes down to the developer's preference.
Why use gcms-stage instead of the query param then?
To keep queries exactly the same across different environments - production, development, etc. - and then instead of passing the param to the query, you use the header.
In some specific cases passing headers could be easier than putting the params in the query itself.
Example usage 'gcms-stage': 'DRAFT':
const fetch =require('cross-fetch');
const headers ={
'Content-Type':'application/json',
'gcms-stage':'DRAFT',
};
const body =JSON.stringify({query:'{ products { name } }'});
This cache header can be used to fine-tune our default caching behavior. For instance, we could use it to make sure we return stale data on errors for much longer.
The need to use this header highly depends on the use-case and whether it's important to always get fresh data or to always get data, no matter if stale or new.
Example usage 'hyg-stale-if-error': '21600':
const fetch =require('cross-fetch');
const headers ={
'Content-Type':'application/json',
'hyg-stale-if-error':'21600',
};
const body =JSON.stringify({query:'{ products { name } }'});
The values are in seconds. The default value is 86400, but this can be adjusted on dedicated clusters if needed.
Pro Tip
This is only available on the High performance endpoint.
The default Stale-if-error for all shared clusters is 86400s (1 day). This value is customizable for dedicated clusters.
To check what your current default is, send a request to the high-performance endpoint and check the response headers called gcms-origin-cache-control. On a shared cluster, the value of the response header would be similar to this s-maxage=31536000, stale-if-error=86400, stale-while-revalidate=0.
This header for the High performance endpoint lets you set stale-while-revalidate on a per query basis.
This cache header can be used to fine-tune our default caching behavior. For instance, we could use it to make sure we return stale data while the cache is revalidating.
The need to use this header highly depends on the use-case and whether it's important to always get fresh data or to always get data, no matter if stale or new.
Example usage 'hyg-stale-while-revalidate': '27':
const fetch =require('cross-fetch');
const headers ={
'Content-Type':'application/json',
'hyg-stale-while-revalidate':'27',
};
const body =JSON.stringify({query:'{ products { name } }'});
The values are in seconds. The default value is 0, but this can be adjusted on dedicated clusters if needed.
Pro Tip
This is only available on the High performance endpoint.
The default stale-while-revalidate for our shared clusters is 0. This value is customizable for dedicated clusters.
To check what your current default is, send a request to the high-performance endpoint and check the response headers called gcms-origin-cache-control. On a shared cluster, the value of the response header would be similar to this s-maxage=31536000, stale-if-error=86400, stale-while-revalidate=0.