Skip to content

Commit

Permalink
docs, graph, store: Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lutter committed Jun 21, 2022
1 parent 226747c commit 113e269
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
24 changes: 12 additions & 12 deletions docs/implementation/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ query.
Details about a deployment that rarely change. Maintained in the
shard alongside the deployment's data in `sgdNNN`.

| Column | Type | Use |
|-------------------------|------------|----------------------------------------------|
| `id` | `integer!` | primary key, same as `deployment_schemas.id` |
| `spec_version` | `text!` | |
| `description` | `text` | |
| `repository` | `text` | |
| `schema` | `text!` | GraphQL schema |
| `features` | `text[]!` | |
| `graph_node_version_id` | `integer` | |
| `use_bytea_prefix` | `boolean!` | |
| `start_block_hash` | `bytea` | Start block from the manifest |
| `start_block_number` | `int4` | |
| Column | Type | Use |
|-------------------------|------------|------------------------------------------------------|
| `id` | `integer!` | primary key, same as `deployment_schemas.id` |
| `spec_version` | `text!` | |
| `description` | `text` | |
| `repository` | `text` | |
| `schema` | `text!` | GraphQL schema |
| `features` | `text[]!` | |
| `graph_node_version_id` | `integer` | |
| `use_bytea_prefix` | `boolean!` | |
| `start_block_hash` | `bytea` | Parent of the smallest start block from the manifest |
| `start_block_number` | `int4` | |

### `subgraph_deployment_assignment`

Expand Down
2 changes: 1 addition & 1 deletion graph/src/data/subgraph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ impl DeploymentState {
if block < self.earliest_block_number {
return Err(format!(
"subgraph {} only has data starting at block number {} \
and data for block number {} is therefore not yet available",
and data for block number {} is therefore not available",
self.id, self.earliest_block_number, block
));
}
Expand Down
3 changes: 2 additions & 1 deletion store/postgres/src/deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ table! {
schema -> Text,
graph_node_version_id -> Nullable<Integer>,
use_bytea_prefix -> Bool,
/// Parent of the smallest start block from the manifest
start_block_number -> Nullable<Integer>,
start_block_hash -> Nullable<Binary>,
}
Expand Down Expand Up @@ -469,7 +470,7 @@ pub fn block_ptr(conn: &PgConnection, id: &DeploymentHash) -> Result<Option<Bloc

/// Initialize the subgraph's block pointer. If the block pointer in
/// `latest_ethereum_block` is set already, do nothing. If it is still
/// `null`, set it to `earliest_ethereum_block`
/// `null`, set it to `start_ethereum_block` from `subgraph_manifest`
pub fn initialize_block_ptr(conn: &PgConnection, site: &Site) -> Result<(), StoreError> {
use subgraph_deployment as d;
use subgraph_manifest as m;
Expand Down

0 comments on commit 113e269

Please sign in to comment.