LimeChain / matchstick

🔥 Unit testing framework for Subgraph development on The Graph protocol. ⚙️
MIT License
207 stars 17 forks source link

Interface relation do not appear in logStore #386

Closed Rekard0 closed 11 months ago

Rekard0 commented 1 year ago

i have this scenario,

interface IExample {
  id: ID! 
  main: Main!
  num: Int!
}

type Example1 implements IExample @entity {
  id: ID! 
  main: Main!
  num: Int!

  num2: Int
}

type Main @entity {
  id: ID!
  examples: [IExample!]! @derivedFrom(field: "main")
}

but in my testing, when i create Main and Example1 there relationship via IExample will not show up in logStore() however when deployed it is all good

i wanted to test something like assert.i32Equals(mainEntity.examples.length, 1);

but i don't know how to properly test this

dimitrovmaksim commented 1 year ago

I think it was answered on Discord, but for visibility, derived field testing currently does not support interfaces https://github.com/LimeChain/matchstick/issues/387. We will try our best, but due to our commitment with other stuff it may take some time.