Skip to content

Improve Batch queries scanner #215

@bartek-doyensec

Description

@bartek-doyensec

Split it into two options:

  • alias batching
  • array batching
    Additionally, perform excessive testing of this solution.

1. Alias Batching

    query GetMultipleUsers {
      user1: user(id: "101") { name, email }
      user2: user(id: "102") { name, email }
      latestPost: post(id: "abc") { title }
    }

2. Array Batching

    [
      { "query": "query { user(id: 1) { name } }", "variables": {} },
      { "query": "query { post(id: 99) { title } }", "variables": {} }
    ]

The server must be explicitly configured to accept an array of queries (e.g., batching: true in Apollo Server).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions