Frequently Asked Questions
Top-level Remote Fields & Content Federation
What are Top-level Remote Fields in Hygraph?
Top-level Remote Fields are a feature in Hygraph that allow you to fetch remote data outside the context of a regular model and send it to your frontend alongside your Hygraph data. Unlike regular Remote Fields, which are tied to a specific model, Top-level Remote Fields are added to the Query system model and can fetch data unrelated to Hygraph content, combining it in the same API call. This enables seamless content federation, eliminating the need for separate API requests for data inside and outside of Hygraph. [Source]
How do I add a Top-level Remote Field in Hygraph?
To add a Top-level Remote Field, select the Query system model in your project schema. Then, choose the REST Remote Field option, configure the display name, API ID, remote source, method (e.g., GET), return type (e.g., a custom type like ReviewMeta), input arguments (such as productId), and the path (e.g., /api/reviews/product/{{args.productId}}). Make the field required if needed, and click Add to save. This setup allows you to fetch remote data and pass it through Hygraph's API. [Source]
What are the prerequisites for using Top-level Remote Fields?
Before adding a Top-level Remote Field, you must have a Remote Source already configured in your Hygraph project. This ensures that the field can connect to and fetch data from the external API you wish to integrate. [Source]
How can I test a Top-level Remote Field in Hygraph?
You can test a Top-level Remote Field immediately after adding it, since it is not connected to a specific content model or entry. Use the API Playground to make a query (for example, fetching reviews for a product by productId) and verify the response. This helps ensure your configuration is correct before integrating it into your frontend. [Source]
Where can I find a video tutorial on Top-level Remote Fields?
You can watch an in-depth video tutorial on Top-level Remote Fields on YouTube: Combine your APIs in your CMS with Hygraph Remote Source Fields.
Features & Capabilities
What is content federation in Hygraph?
Content federation in Hygraph allows you to integrate and deliver content from multiple sources through a single API. With features like Remote Fields and Top-level Remote Fields, you can fetch and combine data from external APIs and Hygraph content, streamlining your content delivery and reducing the need for multiple API calls. [Source]
What are the key capabilities and benefits of Hygraph?
Hygraph is a GraphQL-native Headless CMS that empowers businesses to build, manage, and deliver digital experiences at scale. Key capabilities include content federation, Smart Edge Cache for performance, custom roles, rich text management, project backups, and enterprise-grade security. Benefits include operational efficiency, reduced costs, accelerated speed-to-market, and proven results such as Komax achieving 3X faster time-to-market and Samsung improving customer engagement by 15%. [Customer Stories]
Does Hygraph support integration with external APIs?
Yes, Hygraph supports integration with external APIs through Remote Fields and Top-level Remote Fields. This enables you to fetch and combine data from various sources, including REST APIs, and deliver it through a single GraphQL endpoint. [Source]
Use Cases & Benefits
Who can benefit from using Top-level Remote Fields in Hygraph?
Developers, product managers, and marketing teams who need to combine data from multiple sources (such as product reviews, inventory, or external content) can benefit from Top-level Remote Fields. This feature is especially useful for businesses aiming to deliver unified digital experiences without building complex integrations or making multiple API calls. [Source]
What problems do Top-level Remote Fields solve?
Top-level Remote Fields solve the problem of having to make separate API requests for data inside and outside of Hygraph. They enable you to fetch and deliver remote data together with Hygraph content in a single API call, simplifying integration and improving performance for your frontend applications. [Source]
Technical Requirements & Implementation
What are the steps to configure a Top-level Remote Field for product reviews?
To configure a Top-level Remote Field for product reviews:
- Select the Query system model in your schema.
- Choose the
REST Remote Field option. - Set the display name (e.g., Reviews), API ID, and select the remote source (e.g., HyDemoAPI).
- Set the method to
GET and the return type to a custom type (e.g., ReviewMeta). - Add input arguments (e.g., productId of type Int, required).
- Set the path to
/api/reviews/product/{{args.productId}}. - Click Add to save the field.
After saving, you can test the field in the API Playground by querying for reviews by productId. [Source]
Can I use Top-level Remote Fields with both REST and GraphQL APIs?
Top-level Remote Fields can be configured to fetch data from REST APIs. For GraphQL APIs, you would typically use Remote Fields configured for GraphQL sources. The documentation and UI guide you through selecting the appropriate remote source type. [Source]
Support & Resources
Where can I find more documentation and support for Top-level Remote Fields?
You can find detailed documentation on Top-level Remote Fields at Hygraph Docs. For additional support, Hygraph offers 24/7 support via chat, email, and phone, a community Slack channel, and extensive guides and tutorials. [Documentation] [Slack]
Security & Compliance
What security and compliance certifications does Hygraph have?
Hygraph is SOC 2 Type 2 compliant (as of August 3rd, 2022), ISO 27001 certified, and GDPR compliant. These certifications demonstrate Hygraph's commitment to providing a secure and compliant platform for its users. [Security Features]
Performance & Reliability
How does Hygraph ensure high performance for content delivery?
Hygraph delivers high performance through features like Smart Edge Cache, high-performance endpoints, and continuous improvements to its GraphQL API. These features ensure fast and reliable content delivery, even for high-traffic and global audiences. [Performance Improvements]