# rover supergraph compose --config apollo-router/tests/samples/enterprise/connectors-debugging/supergraph.yaml > apollo-router/tests/samples/enterprise/connectors-debugging/supergraph.graphql
federation_version: =2.10.0-preview.3
subgraphs:
  connectors: # required for snapshot overrides
    routing_url: http://none
    schema:
      sdl: |
        extend schema
          @link(url: "https://specs.apollo.dev/federation/v2.10", import: ["@key"])
          @link(url: "https://specs.apollo.dev/connect/v0.1", import: ["@connect", "@source"])
          @source(
            name: "jsonPlaceholder"
            http: {
              baseURL: "https://jsonplaceholder.typicode.com/"
              headers: [{ name: "x-from", from: "x-test-from" }, { name: "x-invalid-from-source", value: "{$context.abcd}" }]
              queryParams: "invalidFromSource: $config.abcd"
            }
            errors: { message: "$context.aaaaa", extensions: "fromSource: $config.aaaaa" }
          )

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

        type Query {
          posts: [Post] @connect(source: "jsonPlaceholder", http: {GET: "/posts"}, selection: "id title body author: { id: userId }")
          post(id: ID!): Post @connect(source: "jsonPlaceholder", http: {GET: "/posts/{$$args.id}?invalidInConnectUri={$context.aaa}" headers: [{name: "x-invalid-from-connect", value: "{$config.aaa}"}], queryParams: "invalidFromConnect: $config.abcdef"}, selection: "id title: postTitle body author: { id: userId }", entity: true)
          user(id: ID!): User @connect(source: "jsonPlaceholder", http: {GET: "/users/{$$args.id}"}, selection: "id name username", entity: true)
          broken: [Post] @connect(source: "jsonPlaceholder", http: {GET: "/broken"}, selection: "id title body author: { id: userId }", errors: { message: "$config.bbbbb", extensions: "fromSource: $context.bbbbb code: errorCode" } )
        }

        type User {
          id: ID!
          name: String
          username: String
          posts: [Post] @connect(source: "jsonPlaceholder", http: {GET: "/users/{$$this.id}/posts"}, selection: "id title body")
        }
