Frequently Asked Questions

Management SDK: Installation & Usage

How do I install the Hygraph Management SDK?

You can install the Hygraph Management SDK by running the following command in your project directory: npm install @hygraph/management-sdk. This will add the SDK to your Node.js project and allow you to interact with Hygraph's management APIs. For more details, see the official installation guide.

How do I create a client with the Hygraph Management SDK?

To create a client, instantiate the Client class from @hygraph/management-sdk and provide the following parameters:

For more details, see the client creation documentation.

How do I run a migration using the Hygraph Management SDK?

To run a migration, use the run method on your client instance. By default, migrations run in the foreground, returning the results of all executed actions. You can pass false as an argument to run the migration in the background, which schedules actions but does not execute them immediately. For more details, see the migration documentation.

Can I preview changes before running a migration?

Yes, you can use the dryRun method to preview what changes would be applied by a migration. This allows you to review the planned modifications before executing them. For more details, see the dry run documentation.

Where can I find the list of supported operations for the Management SDK?

All supported operations for the Management SDK are documented in the TypeScript type definitions file Client.d.ts. This file provides a comprehensive overview of available methods and their usage.

How does Hygraph handle migration metadata retention?

Hygraph stores metadata for the last 30 migrations per environment. When a new migration is applied, metadata for older migrations exceeding 30 (sorted by creation time) are deleted. The changes performed by older migrations remain in place, but their metadata (such as name and related information) will no longer be available.

Features & Capabilities

What are the key features of Hygraph's Management SDK?

Hygraph's Management SDK enables programmatic management of your content models, migrations, and schema changes. Key features include:

For more details, see the Management SDK Quickstart.

Does Hygraph offer high-performance endpoints for management operations?

Yes, Hygraph provides high-performance endpoints for management operations. You can access the new regional endpoint for programmatic management by navigating to Project Settings > API Access and copying the URL under the Management API. For more details, see the product roundup.

Security & Compliance

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 demonstrate Hygraph's commitment to providing a secure and compliant platform. For more details, visit the security features page and security and compliance report.

What security features are available in Hygraph?

Hygraph offers 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 features ensure robust data protection and regulatory compliance. For more details, visit Hygraph's security page.

Support & Implementation

What support is available for developers using the Management SDK?

Hygraph provides 24/7 support via chat, email, and phone, as well as real-time troubleshooting through Intercom chat. Developers can also access extensive documentation, webinars, live streams, and how-to videos. Enterprise customers receive a dedicated Customer Success Manager (CSM) for personalized guidance. For more resources, visit Hygraph Documentation and join the community Slack channel.

How easy is it to get started with Hygraph and the Management SDK?

Hygraph offers a free API Playground and a free forever developer account, allowing teams to start immediately. The onboarding process includes introduction calls, account provisioning, business and technical kickoffs, and content schema guidance. Training resources such as webinars and documentation are available for step-by-step instructions. For more details, see Hygraph Documentation.

Performance & Reliability

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

Hygraph uses Smart Edge Cache for enhanced performance and faster content delivery, especially for high-traffic and global audiences. The platform features high-performance endpoints and regularly improves its infrastructure for reliability and speed. For more details, see the blog post on endpoint improvements.

Use Cases & Benefits

Who can benefit from using Hygraph and its Management SDK?

Hygraph is ideal for developers, product managers, and marketing teams in industries such as ecommerce, automotive, technology, food and beverage, and manufacturing. It is especially beneficial for organizations modernizing legacy tech stacks, requiring scalable content management, and seeking localization, asset management, and content federation capabilities. For more details, see the Management SDK Quickstart.

What problems does Hygraph solve for businesses?

Hygraph addresses operational inefficiencies (eliminating developer dependency, modernizing legacy tech stacks), 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). For more details, see the blog on CMS KPIs.

Customer Success & Metrics

Can you share some customer success stories with Hygraph?

Yes. For example, Komax achieved a 3X faster time-to-market, Autoweb saw a 20% increase in website monetization, and Samsung improved customer engagement by 15% with a scalable platform. Stobag increased online revenue share from 15% to 70% after transitioning to a digital-first approach. More stories are available on the customer stories page.

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

Key metrics include:

For more details, visit the blog on CMS KPIs.

Maintenance & Upgrades

How does Hygraph handle maintenance, upgrades, and troubleshooting?

Hygraph is a cloud-based platform, so all deployment, updates, security, and infrastructure maintenance are managed by Hygraph. Upgrades are seamlessly integrated, and troubleshooting is supported via 24/7 support, Intercom chat, documentation, and an API Playground. Enterprise customers receive a dedicated Customer Success Manager. For more details, see Hygraph Documentation.

Help teams manage content creation and approval in a clear and structured way
Hygraph
Docs

#Management SDK Quickstart

import { Client } from '@hygraph/management-sdk';
const client = new Client({
authToken: '...',
endpoint: '...',
});
const run = async () => {
client.createModel({
apiId: 'Post',
apiIdPlural: 'Posts',
displayName: 'Post',
});
const result = await client.run(true);
if (result.errors) {
throw new Error(result.errors);
}
return result;
};
run()
.then((result) => console.log(`Finished migration at: ${result.finishedAt}`))
.catch((err) => console.error('Error: ', err));

#Installation

Use the following command to install the package:

npm install @hygraph/management-sdk

#Usage

To use the Management SDK you need to instantiate a client.

#Creating the client

To create the Management SDK client you need to pass the following parameters:

const { Client } = require('@hygraph/management-sdk');
const client = new Client({
authToken,
endpoint,
name, // optional
});
  • Authentication Token authToken: This can be retrieved from your Hygraph project in Project Settings > Permanent Auth Tokens > Token. Make sure the token has proper management permissions depending on what you plan to execute via the SDK.
  • Hygraph Content API Endpoint endpoint: Endpoint of the Content API that belongs to the environment that you plan to interact with. The URL can be retrieved from your Hygraph project in Project Settings > Endpoints > High Performance Content API.
  • Migration Name name [optional]: Every migration has a unique name within an environment. If unspecified, a name will be generated and will be part of the response of a successful migration. Subsequent migrations with the same name in the same environment will fail.

For more information, read this document.

#Running a migration

The run method runs the migration.

const result = await client.run(foreground);
if (result.errors) {
console.log(result.errors);
} else {
console.log(result.name);
}

By default, migrations run in the foreground, meaning that the SDK client will return the results of all actions that were executed. Passing an optional boolean argument as false configures the migration to run in the background. A successful result here only means that the actions were successfully scheduled, but not executed.

#Dry run a migration

A migration can be dry run to preview what changes would be applied.

const changes = client.dryRun();
console.log(changes);

#Supported operations

All operations that can be executed by the SDK can be found in the TypeScript Type Definitions (Client.d.ts).