spring-graphql icon indicating copy to clipboard operation
spring-graphql copied to clipboard

Nested Batches

Open Segelente opened this issue 8 months ago • 8 comments

Hello there, I wanted to know if and how it is currently possible to use the BatchMapping with only one request for this situation: Basically currently when mapping on type extension and field data it requested data from my server twice. Is it possible in this situation to avoid a second call and call everything in one go?

type Query{
  query: ReturnObject
}
type ReturnObject{
  id: ID
  header: [Header]
}
interface Header{
  id: ID
  description: String
}
interface Extension{
  id: ID
  data: String
}
type ObjectA implements Header & Extension{
  id: ID
  description: String
  data: String
}
type ObjectB implements Header {
  id: ID
  description: String
  objectC : [ObjectC ]
}
type ObjectC implements Extension{
  id: ID
  data: String
}

Segelente avatar Jun 14 '24 12:06 Segelente