Skip to content

Commit

Permalink
fix: manifest and schema FDS
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmardefago committed Nov 28, 2023
1 parent a8b579b commit d04ddae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mappings/ipfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export function handleSubgraphDeploymentSchema(content: Bytes): void {
if (content !== null) {
subgraphDeploymentSchema.schema = content.toString()
}
subgraphDeploymentSchema.save()
}

export function handleSubgraphDeploymentManifest(content: Bytes): void {
Expand All @@ -97,7 +98,7 @@ export function handleSubgraphDeploymentManifest(content: Bytes): void {
subgraphDeploymentManifest.schemaIpfsHash = schemaIpfsHash

// Can't create this template here yet (due to current implementation limitations on File Data Sources, but once that's sorted out, this should work.)
//SubgraphDeploymentSchemaTemplate.create(schemaIpfsHash)
SubgraphDeploymentSchemaTemplate.create(schemaIpfsHash)
} else {
log.warning("[MANIFEST PARSING FAIL] subgraphDeploymentManifest: {}, schema file hash can't be retrieved. Error: schemaIpfsHashTry.length isn't 2, actual length: {}", [dataSource.stringParam(), schemaIpfsHashTry.length.toString()])
}
Expand All @@ -123,5 +124,8 @@ export function handleSubgraphDeploymentManifest(content: Bytes): void {
} else {
log.warning("[MANIFEST PARSING FAIL] subgraphDeploymentManifest: {}, network can't be parsed. Error: networkSplitTry.length isn't 2, actual length: {}", [dataSource.stringParam(), networkSplitTry.length.toString()])
}
let substreamsSplitTry = manifest.split('- kind: substreams', 2)
subgraphDeploymentManifest.poweredBySubstreams = substreamsSplitTry.length > 1
}
subgraphDeploymentManifest.save()
}

0 comments on commit d04ddae

Please sign in to comment.