Joystream / hydra

A Substrate indexing framework
49 stars 44 forks source link

hydra-cli: codegen fails when an interface has a relationship field. #359

Open dzhelezov opened 3 years ago

dzhelezov commented 3 years ago

hydra-cli codegen fails when run against the following input schema

type Event @entity {
  "Event ID"
  id: ID!

  "Block number"
  inBlock: Int!
}

interface MembershipEvent @entity {
  "Generic event data"
  event: Event!
}

type MembershipBoughtEvent implements MembershipEvent @entity {
  "Generic event data"
  event: Event!

  "New member handle."
  handle: String!
}

hydra-cli version: 2.1.0-beta.7

Lezek123 commented 3 years ago

I noticed that if the interface has both a relationship field and some other fields (ie. Int), like:

interface MembershipEvent @entity {
  "Generic event data"
  event: Event!

  someOtherField: Int!
}

The codegen does not fail, but:

dzhelezov commented 3 years ago

@metmirr Please close if it's been fixed