spring-projects / spring-projects/spring-graphql

Nested Batches

Open
#997 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: feedback-provided status: waiting-for-triage
Dominant language
Java
Stars
1.6k
Forks
336
PR merge metrics
No merged PRs in 30d

Description

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
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the BatchMapping behavior described in the issue and the nested GraphQL schema example. Determine whether the type-extension and field mappings can be combined into one request, and document the supported behavior or the design needed to avoid the second server call.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, java, spring
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.