1

I'm going through Nader Dabit's Web3 Blog and everything works just fine until I have to run yarn deploy which runs a script from my package.json

{
  "name": "casen-blog",
  "license": "UNLICENSED",
  "scripts": {
    "codegen": "graph codegen",
    "build": "graph build",
    "deploy": "graph deploy --node https://api.thegraph.com/deploy/ cluck135/casen-blog",
    "create-local": "graph create --node http://localhost:8020/ cluck135/casen-blog",
    "remove-local": "graph remove --node http://localhost:8020/ cluck135/casen-blog",
    "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 cluck135/casen-blog"
  },
  "dependencies": {
    "@graphprotocol/graph-cli": "0.30.0",
    "@graphprotocol/graph-ts": "0.27.0"
  }
}

After running I get the following error message

✖ Failed to deploy to Graph node https://api.thegraph.com/deploy/: subgraph validation error: [The feature fullTextSearch, ipfsOnEthereumContracts is used by the subgraph but it is not declared in the manifest.]

enter image description here

Honestly not sure what to do here as the manifest I believe has to do with the undefined.wasm file, so maybe it has to do with the build? but the build worked fine so I'm not sure. Let me know if you have any suggestions on where the problem is even if you're unsure.

subgraph.yaml below

specVersion: 0.0.5
schema:
  file: schema.graphql
dataSources:
  - kind: ethereum
    name: undefined
    network: mumbai
    source:
      address: "0x94BAee80630422d19D7b61f810e442b81ac1be7e"
      abi: Blog
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.5
      language: wasm/assemblyscript
      entities:
        - Post
      abis:
        - name: Blog
          file: undefined/abis/Blog.json
      eventHandlers:
        - event: PostCreated(uint256,string,string)
          handler: handlePostCreated
        - event: PostUpdated(uint256,string,string,bool)
          handler: handlePostUpdated
      file: undefined/undefined.wasm

schema.graphql below

type _Schema_
  @fulltext(
    name: "postSearch"
    language: en
    algorithm: rank
    include: [{ entity: "Post", fields: [{ name: "title" }, { name: "postContent" }] }]
  )

type Post @entity {
  id: ID!
  title: String!
  contentHash: String!
  published: Boolean!
  postContent: String!
  createdAtTimestamp: BigInt!
  updatedAtTimestamp: BigInt!
}

1 Answer 1

1

As of 0.0.4, you need to declare all the features you're using, in your manifest (as a top level, like specVersion or schema).

For instance, try adding:

features:
  - fullTextSearch
  - ipfsOnEthereumContracts

to your subgraph.yaml

See this for full ref: https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md

Or this subgraph template for a quick example: https://github.com/jbx-protocol/juice-subgraph/blob/main/subgraph.template.yaml (disclosure: I'm a Juicebox contributor)

2
  • Thanks! that worked, just had to make it - fullTextSearch with camelcase for future visitors who copy and paste. May 21, 2022 at 18:33
  • good catch @CasenLuck, edited - For SEO, could mark it as an answer if it solves your issue? May 22, 2022 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.