extend schema
  @link(
    url: "https://specs.apollo.dev/connect/v0.2"
    import: ["@connect", "@source"]
  )
  @source(
    name: "v1"
    http: { baseURL: "https://example.com", queryParams: "$config.query" }
  )
  @source(
    name: "v2"
    http: {
      baseURL: "https://example.com"
      queryParams: "$({ s: 's', i: 1, f: .9, b: false, n: null })"
    }
  )
  @source(
    name: "v3"
    http: { baseURL: "https://example.com", queryParams: "bad" }
  )
  @source(
    name: "v4"
    http: { baseURL: "https://example.com", queryParams: "$([])" }
  )
  @source(
    name: "v5"
    http: { baseURL: "https://example.com", queryParams: "$('bad')" }
  )

type Query {
  resources(s: String, i: Int, f: Float, b: Boolean): [String!]!
    @connect(
      source: "v2"
      http: { GET: "/", queryParams: "$args" }
      selection: "$"
    )
    @connect(
      source: "v2"
      http: {
        GET: "/"
        queryParams: "$({ s: 's', i: 1, f: .9, b: false, n: null })"
      }
      selection: "$"
    )
    @connect(
      source: "v2"
      http: { GET: "/", queryParams: "bad" }
      selection: "$"
    )
    @connect(
      source: "v2"
      http: { GET: "/", queryParams: "$('bad')" }
      selection: "$"
    )
    @connect(
      source: "v2"
      http: { GET: "/", queryParams: "$(['bad'])" }
      selection: "$"
    )
    @connect(
      source: "v2"
      http: { GET: "/", queryParams: "$config.query" }
      selection: "$"
    ) # unknown
    @connect(
      source: "v2"
      http: { GET: "/", queryParams: "$args.s" }
      selection: "$"
    ) # string, not allowed
}
