extend schema
  @link(url: "https://specs.apollo.dev/federation/v2.7", import: ["@key"])
  @link(url: "https://specs.apollo.dev/connect/v0.2", import: ["@connect", "@source"])
  @source(
    name: "json"
    isSuccess: "id->eq('yay')"
    http: {
      baseURL: "https://jsonplaceholder.typicode.com/"
      headers: [
        { name: "AuthToken", from: "X-Auth-Token" }
        { name: "user-agent", value: "Firefox" }
      ]
    }
  )

type Query {
  users: [User]
    @connect(
      source: "json"
      http: { GET: "/users" }
      selection: "id name"
    )

  posts: [Post]
    @connect(
      source: "json"
      http: { GET: "/posts" }
      selection: "id title body"
    )
}

type User @key(fields: "id", resolvable: false) {
  id: ID!
  name: String
}

type Post {
  id: ID!
  title: String
  body: String
}