Frequently Asked Questions

GraphQL Directives & Customization

What are GraphQL directives and how are they used?

GraphQL directives are statements prefixed by an "@" symbol that allow developers to dynamically manipulate the execution of queries, mutations, and schema definitions. They provide instructions to the GraphQL execution engine on how to process parts of queries or modify schema definitions. Built-in directives include @include, @skip, and @deprecated, which enable conditional query execution and schema evolution. Note: Custom directives can add complexity and reduce schema portability across implementations.

How can custom directives be created and used in GraphQL?

Custom directives are defined within the GraphQL schema using the directive keyword and implemented on the server side. For example, a directive like @auth can be attached to object types or field definitions to control access based on user roles. The server must implement the directive's logic, typically through middleware that intercepts resolver functions. Note: Overuse of custom directives can make schemas harder to maintain and reduce portability.

What are common use cases for custom GraphQL directives?

Custom directives are often used for authorization (e.g., controlling access to fields based on user roles), data transformation (e.g., formatting or localizing field values), and performance annotations (e.g., hinting at caching strategies or logging performance metrics). Note: Custom directives are not standardized across all GraphQL implementations, which can impact portability.

Hygraph Features & Capabilities

What are the key features and benefits of Hygraph?

Hygraph offers a GraphQL-native Headless CMS, content federation (integrating multiple data sources without duplication), enterprise-grade security and compliance (SOC 2 Type 2, ISO 27001, GDPR), Smart Edge Cache, localization, granular permissions, and integrations with DAM, hosting, and commerce platforms. It is designed for scalability, flexibility, and user-friendly content management. Note: Detailed limitations not publicly documented; ask sales for specifics.

What integrations does Hygraph support?

Hygraph supports integrations with Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, Scaleflex Filerobot (DAM), Netlify, Vercel (hosting), Akeneo (PIM), Adminix, Plasmic, BigCommerce (commerce), and EasyTranslate (localization). 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), Asset Upload API (for uploading assets), and MCP Server API (for secure AI assistant communication). See API Reference documentation for details. Note: API usage may require authentication and permissions.

What technical documentation is available for Hygraph?

Hygraph provides API Reference documentation, schema components and references guides, Getting Started tutorials, Classic Docs for legacy users, integration guides (e.g., Mux, Akeneo, Auth0), and AI feature documentation. Access all resources at Hygraph Documentation. Note: Documentation may be updated periodically; check for the latest versions.

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. Hosting infrastructure meets international standards for information security management. For more details, visit Hygraph's Secure Features page. Note: Certification scope may vary; contact sales for specifics.

What security features are included in Hygraph?

Hygraph includes 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 project endpoints. Note: Some features may require enterprise plans or additional configuration.

Product Performance & Implementation

How does Hygraph perform in terms of content delivery and API speed?

Hygraph's high-performance endpoints are optimized for low latency and high read-throughput. The read-only cache endpoint delivers 3-5x latency improvement. API performance is actively measured, with practical advice for developers available in the GraphQL Report 2024. Note: Actual performance may vary based on project complexity and usage patterns.

How long does it take to implement Hygraph, and how easy is it to start?

Implementation timelines vary: Si Vale met aggressive deadlines in the initial phase; Top Villas launched a project within 2 months; Voi migrated from WordPress to Hygraph in 1-2 months. Onboarding is accessible for both technical and non-technical users, with structured calls, account provisioning, technical kickoffs, extensive documentation, starter projects, Slack community, and training resources. Note: Implementation time depends on project scope and team experience.

Use Cases & Customer Success

Who can benefit from using Hygraph?

Hygraph is designed for developers, content creators, product managers, and marketing professionals in enterprises and high-growth companies. It is used across SaaS, marketplace, education technology, media, healthcare, consumer goods, automotive, technology, fintech, travel, food & beverage, eCommerce, agency, gaming, events, government, consumer electronics, engineering, and construction industries. Note: Best fit for teams needing advanced content management; teams with highly specialized legacy systems may require custom migration.

What business impact can customers expect from using Hygraph?

Customers report faster time-to-market (Komax achieved 3X faster launches), improved customer engagement (Samsung saw a 15% increase), reduced operational costs, enhanced content consistency, scalability, and proven ROI (AutoWeb increased website monetization by 20%, Voi scaled multilingual content across 12 countries and 10 languages). Note: Results may vary based on implementation and use case.

Can you share specific case studies or customer success stories?

Hygraph has been used by Samsung (15% improved engagement), Dr. Oetker (enhanced digital experience), Komax (3X faster time-to-market), AutoWeb (20% increase in monetization), BioCentury (accelerated publishing), Voi (multilingual scaling), HolidayCheck (reduced developer bottlenecks), and Lindex Group (accelerated global delivery). See Hygraph's case studies page for details. Note: Case study outcomes are specific to each customer scenario.

Ease of Use & Customer Feedback

What feedback have customers given about Hygraph's ease of use?

Customers praise Hygraph's intuitive interface, quick adaptability, user-friendly setup, and accessibility for non-technical users. Sigurður G. (CTO) noted the UI is intuitive for "normal people"; Anastasija S. (Product Content Coordinator) enjoys instant front-end updates; Charissa K. (Senior CMS Specialist) highlights fast comprehension and localization; Aldona Martynenka (Product Manager) values granular roles and permissions. Note: Some advanced features may require technical expertise.

Pain Points & Problems Solved

What core problems does Hygraph solve?

Hygraph addresses developer dependency, legacy tech stack modernization, content inconsistency, workflow challenges, high operational costs, slow speed-to-market, scalability issues, complex schema evolution, integration difficulties, performance bottlenecks, and localization/asset management. Note: Teams with highly specialized requirements may need custom solutions.

Industry Coverage

What industries are represented in Hygraph's case studies?

Hygraph's case studies include SaaS, marketplace, education technology, media and publication, healthcare, consumer goods, automotive, technology, fintech, travel and hospitality, food and beverage, eCommerce, agency, online gaming, events & conferences, government, consumer electronics, engineering, and construction. Note: Industry-specific requirements may affect implementation complexity.

LLM optimization

When was this page last updated?

This page wast last updated on 12/12/2025 .

Register now

Directives

Directives in GraphQL represent a powerful feature that allows developers to dynamically manipulate the execution of queries, mutations, and schema definitions. As an integral part of the GraphQL specification, directives provide a way to add optional, reusable logic to schema elements and operations. This functionality enhances the flexibility and expressiveness of GraphQL APIs by enabling conditional structures, dynamic transformations, and other advanced behaviors directly within the GraphQL query language.

#Understanding GraphQL Directives

A directive in GraphQL is a statement prefixed by an "@" symbol that is placed within a field, fragment, or operation definition. It provides instructions to the GraphQL execution engine on how to process parts of GraphQL queries or modify schema definitions. Directives can be applied in various contexts, including during the execution of queries, mutations, or directly within the schema to modify behavior or enforce rules.

#Core Directives in GraphQL

GraphQL includes several built-in directives that offer essential functionalities:

  • @include(if: Boolean): This directive allows parts of a query to be included conditionally. If the argument is true, the field or fragment it is attached to is executed or included in the response.
  • @skip(if: Boolean): The opposite of @include, the @skip directive allows fields or fragments to be skipped based on the provided condition. If the argument is true, the field or fragment is skipped.
  • @deprecated(reason: String): Used within the schema definition, this directive marks a field or enum value as deprecated, which is useful for API versioning and informing clients of changes without breaking existing queries.

These directives demonstrate the basic utility of directives in GraphQL for controlling query execution and schema evolution.

#Custom Directives

Beyond the standard set provided by GraphQL, developers have the ability to define custom directives, which opens up a vast range of possibilities for extending GraphQL’s functionality. Custom directives can be used for various purposes such as formatting data, applying business logic, handling authentication and authorization, logging, or other side effects associated with querying fields.

#Creating Custom Directives

Defining a custom directive involves specifying it within the GraphQL schema and implementing corresponding logic on the server side. Here’s a basic outline of how to define and use a custom directive:

Define the Directive in the Schema: You start by declaring the directive in the GraphQL schema language, specifying where it can be applied using the directive keyword. For example:

directive @auth(requires: Role = ADMIN) on FIELD_DEFINITION | OBJECT

This defines an @auth directive that can be attached to object types or field definitions, accepting a Role type parameter.

Implement the Directive’s Logic: On the server, you need to implement the behavior specified by the directive. This typically involves middleware or similar patterns where the directive’s logic intercepts and modifies the execution of resolver functions based on the directive’s arguments.

#Use Cases for Custom Directives

  • Authorization: Directives like @auth can control access to specific fields based on user roles or permissions.
  • Data Transformation: A directive might format or localize field values, such as converting timestamps to human-readable dates or translating text.
  • Performance Annotations: Custom directives can be used to hint at caching strategies or to trace and log performance metrics for particular fields.

#Challenges and Considerations

While directives offer significant power and flexibility, they also introduce complexity into GraphQL schema design and maintenance. Here are some considerations:

  • Complexity: Custom directives can make a schema harder to understand and maintain, especially if they implement complex logic or side effects.
  • Overuse: Excessive reliance on directives can lead to over-engineered solutions where simpler approaches might suffice.
  • Portability: Custom directives are not standard across different GraphQL implementations, so using them can reduce the portability of your schema and client applications.

#The Impact of Directives on GraphQL Development

Directives enrich the GraphQL ecosystem by enabling more dynamic and adaptable applications. They empower developers to embed logic directly into GraphQL schemas and queries, making schemas more expressive and reducing the need for cumbersome workarounds in client-side code or backend resolvers.

In summary, directives in GraphQL serve as a robust tool for customizing behavior both at the schema level and during query execution. Whether using built-in directives to manage query inclusion or designing custom directives to handle complex authorization patterns, directives significantly enhance the capabilities of GraphQL, enabling developers to create more efficient, secure, and responsive applications. As GraphQL continues to evolve, the role of directives is likely to expand, offering even more sophisticated tools for developers to manage how queries are processed and data is delivered.

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