extend schema
  @link(url: "https://specs.apollo.dev/federation/v2.11", import: ["@key"])
  @link(url: "https://specs.apollo.dev/connect/v0.2", import: ["@source", "@connect"])
  @source(name: "my-source", http: { baseURL: "http://127.0.0.1" })

type Query {
  users: [User]
    @connect(http: { GET: "http://localhost:4001/users" }, selection: "id")
}

type User
  @connect(
    source: "my-source"
    http: {
      GET: "/users?a={$context.id}&ids={$batch.id->joinNotNull(',')}"
    }
    selection: """
    $.results {
      id: foo.bar
      name
      profilePic: profile_pic
    }
    """
  )
{
  id: ID!
  name: String
  profilePic: String
}
