Graphqlresolver for common subfield under different parent field type

Graphqlresolver for common subfield under different parent field type


0

I am new to graphql, I have requirement where multiple different types have the same field which I am fetching from downstream call, can you please suggest how I can write the graphqlresolver for this subfield?

{
  Type1 {
    title
    Field1
  },
  Type2 {
    Field1
  }
}

here Field1 value I will be getting I want to write resolver which will fetch value based on parent type also if the downstream support batch api how can i call api only once for type1 and type2 fields?


Load 6 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *