Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document feature managment #2746

Merged
merged 2 commits into from
Aug 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion docs/subgraph-manifest.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Subgraph Manifest
##### v.0.0.2
##### v.0.0.4

## 1.1 Overview
The subgraph manifest specifies all the information required to index and query a specific subgraph. This is the entry point to your subgraph.
Expand All @@ -20,6 +20,7 @@ Any data format that has a well-defined 1:1 mapping with the [IPLD Canonical For
| **graft** | optional [*Graft Base*](#18-graft-base) | An optional base to graft onto. |
| **dataSources**| [*Data Source Spec*](#15-data-source)| Each data source spec defines the data that will be ingested as well as the transformation logic to derive the state of the subgraph's entities based on the source data.|
| **templates** | [*Data Source Templates Spec*](#17-data-source-templates) | Each data source template defines a data source that can be created dynamically from the mappings. |
| **features** | optional [*[String]*](#19-features) | A list of feature names used by the subgraph. |

## 1.4 Schema

Expand Down Expand Up @@ -130,3 +131,23 @@ A subgraph can be _grafted_ on top of another subgraph, meaning that, rather tha
| --- | --- | --- |
| **base** | *String* | The subgraph ID of the base subgraph |
| **block** | *BigInt* | The block number up to which to use data from the base subgraph |
## 1.9 Features
Starting from `specVersion` `0.0.4`, a subgraph must declare all _feature_ names it uses to be
considered valid.

A Graph Node instance will **reject** a subgraph deployment if:
- the `specVersion` is equal to or higher than `0.0.4` **AND**
- it hasn't explicitly declared a feature it uses.

No validation errors will happen if a feature is declared but not used.

These are the currently available features and their names:

| Feature | Name |
| --- | --- |
| Non-fatal errors | `nonFatalErrors` |
| Full-text Search | `fullTextSearch` |
| Grafting | `grafting` |
| IPFS on Ethereum Contracts | `ipfsOnEthereumContracts` |