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?ids={$batch.id->joinNotNull(',')}"
}
selection: """
$.results {
name
profilePic: profile_pic
}
"""
)
{
id: ID!
name: String
profilePic: String
}