Help with compound key

  • In PersonalDetail type, can I define compound key(index) on codeId & timestamp fields?
    type Tcode {
      codeConceptId: Int! @id
      domain: String!
    }
    
    type PersonalDetail {
      codeId: Tcode!
      hasEthnicityId: Tcode!
      hasGenderId: Tcode!
      hasMaritalStatusId: Tcode!
      hasRaceIds: [Tcode]!
      timestamp: Int! @search
    }
    

You are asking two questions, so I am going to answer the one from the title. Please edit this post, delete the second question, and create a new post for that question.

There are dozens of posts on composite (compound keys) which don’t exist in DGraph, but there are potential work arounds depending on your use case. The thread above should help get you started through the Discuss rabbit hole.

J

1 Like