Skip to content

Is it possible to change the endpoint of a subgraph via my gateway.config.ts? #1039

Answered by ardatan
Quasarman asked this question in Q&A
Discussion options

You must be logged in to vote

You need to use location not endpoint.

export const gatewayConfig = defineConfig({
    supergraph: './supergraph.graphql',
    transportEntries: {
        MyApi: {
            location: process.env.API_ENDPOINT,  // You need to use `location` instead of `endpoint`
            headers: [
                ['Authorization', `Bearer ${process.env.API_TOKEN}`]
            ]
        },
    }
});

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Quasarman
Comment options

Answer selected by Quasarman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants