subgraphs:
  connectors:
    routing_url: none
    schema:
      sdl: |
        extend schema
          @link(url: "https://specs.apollo.dev/federation/v2.7")
          @link(
            url: "https://specs.apollo.dev/connect/v0.1"
            import: ["@connect", "@source"]
          )
          @source(
            name: "json"
            http: {
              baseURL: "https://jsonplaceholder.typicode.com/"
            }
          )

        type Commit {
          commit: CommitDetail
        }
        
        type CommitDetail {
          name_from_path: String
          by: CommitAuthor
        }
        
        type CommitAuthor {
          name: String
          email: String
          owner: String
        }
        
        type Query {
          commits(owner: String!, repo: String!): [Commit]
            @connect(
              source: "json"
                http: { 
                  GET: "/repos/{$$args.owner}/{$$args.repo}/commits" 
                  headers: [
                    { name: "x-multiline", value: "multi\n line\n header" }
                  ]
                }
                selection: """
                commit {
                  name_from_path: author.name
                  by: {
                    name: author.name
                    email: author.email
                    owner: $$args.owner
                  }
                }
            """
          )
        }
