0

principal

interface Community {
  uuid: String
  name: String
  tagline: String
  desc: String
  location: String
}

his children

type CommunityWithOwnerUser implements Community {
  uuid: String
  name: String
  tagline: String
  desc: String
  location: String
  //....owner details
  ownerUuid:String
  ownerName:String
}

other child

type CommunityWithAnyMember implements Community {
  uuid: String
  name: String
  tagline: String
  desc: String
  location: String
  //....member details
  memberUuid:String
  memberName:String
}

I know that these types are unreasonable.it is example

my question

I've rewritten the details of the Community type in all type definitions. instead it would be great if I could use something like extend

type CommunityWithAnyMember extend Community {
  memberUuid:String
  memberName:String
}

its output

type CommunityWithAnyMember {
  uuid: String
  name: String
  tagline: String
  desc: String
  location: String
  memberUuid:String
  memberName:String
}

I've been doing research for a long time. I found https://github.com/Sydsvenskan/node-graphql-partials but it didn't help.Thank you for your answer

jo_va
  • 13,504
  • 3
  • 23
  • 47
Yasin Tazeoglu
  • 884
  • 8
  • 14

0 Answers0