Docs
検索⌘ K
  • Home
  • The Graphについて
  • サポートされているネットワーク
  • Protocol Contracts
  • サブグラフ
    • サブストリーム
      • Token API
        • AI Suite
          • インデクシング
            • リソース
              サブグラフ > How-to Guides

              2 分

              安全なサブグラフのコード生成

              Subgraph Uncrashable⁠ is a code generation tool that generates a set of helper functions from the graphql schema of a project. It ensures that all interactions with entities in your Subgraph are completely safe and consistent.

              Subgraph Uncrashable と統合する理由

              • Continuous Uptime. Mishandled entities may cause Subgraphs to crash, which can be disruptive for projects that are dependent on The Graph. Set up helper functions to make your Subgraphs “uncrashable” and ensure business continuity.

              • Completely Safe. Common problems seen in Subgraph development are issues of loading undefined entities, not setting or initializing all values of entities, and race conditions on loading and saving entities. Ensure all interactions with entities are completely atomic.

              • User Configurable Set default values and configure the level of security checks that suits your individual project’s needs. Warning logs are recorded indicating where there is a breach of Subgraph logic to help patch the issue to ensure data accuracy.

              Key Features

              • The code generation tool accommodates all Subgraph types and is configurable for users to set sane defaults on values. The code generation will use this config to generate helper functions that are to the users specification.

              • また、このフレームワークには、エンティティ変数のグループに対して、カスタムだが安全なセッター関数を作成する方法が(設定ファイルを通じて)含まれています。この方法では、ユーザーが古いグラフ・エンティティをロード/使用することは不可能であり、また、関数が必要とする変数の保存や設定を忘れることも不可能です。

              • Warning logs are recorded as logs indicating where there is a breach of Subgraph logic to help patch the issue to ensure data accuracy.

              Subgraph Uncrashableは、Graph CLI codegenコマンドでオプションのフラグとして実行することができます。

              1graph codegen -u [options] [<subgraph-manifest>]

              Visit the Subgraph uncrashable documentation⁠ or watch this video tutorial⁠ to learn more and to get started with developing safer Subgraphs.

              ⁠GitHubで編集する⁠

              グラフティングでコントラクトを取り替え、履歴を残すThe Graphに移行する
              このページでは
              • Subgraph Uncrashable と統合する理由
              The GraphStatusTestnetBrand AssetsForumSecurityプライバシーポリシーTerms of Service