Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

header propogation for pass through rule not working #6575

Open
sachet-mittal opened this issue Jan 18, 2025 · 1 comment
Open

header propogation for pass through rule not working #6575

sachet-mittal opened this issue Jan 18, 2025 · 1 comment

Comments

@sachet-mittal
Copy link

sachet-mittal commented Jan 18, 2025

Describe the bug

After upgrading router from 1.4 to 1.59, the headers are not propagating from super-graph to sub-graph

To Reproduce

Steps to reproduce the behavior:

  1. Update the router binary from curl -sSL https://router.apollo.dev/download/nix/latest | sh
  2. Update the container image:
-FROM --platform=linux/X86_64 ghcr.io/apollographql/router:v1.40.1
+FROM --platform=linux/X86_64 ghcr.io/apollographql/router:v1.59.0
  1. Update the config from ./router config upgrade <path to yaml>
  2. header rules:
headers:
  all:
    request:
    # https://deploy-preview-4733--apollo-router-docs.netlify.app/configuration/header-propagation#rule-ordering
    # propagate rest of the headers to subgraph
      - propagate:
          matching: .*
      # rename the headers before propagating to subgraph
      - propagate:
          named: <header 1>
          rename: client-<header 1>
     - propagate:
              named: <header 2>
              rename: client-<header 2>
     - propagate:
              named: <header 3>
              rename: client-<header 3>

I tried to put the pass-through rule both at the top and bottom. But it the result is same regadless

Expected behavior

  • All the headers should go to sub graphs

Output

  • The apis fail with this error:
subgraph response contains invalid 'content-type' header value "null"; expected content-type: application/json or content-type: application/graphql-response+json, Location: undefined, Path:

I added logs on both super graph and sub graph. I do see this header in super graph logs but not so in subgraph log.

Am I missing something here?

Additional context

Add any other context about the problem here.

@sachet-mittal sachet-mittal changed the title header propogation for default rule not working header propogation for pass through rule not working Jan 18, 2025
@sachet-mittal
Copy link
Author

bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant