question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gateway should offer configuration point for introspection query

See original GitHub issue

Gateways currently offer a configuration point for buildService -> willSendRequest, which allows setting headers on normal federated requests to their services, but they offer no configuration hook for sending the initial query GetServiceDefinition { _service { sdl } } request.

https://spectrum.chat/apollo/apollo-federation/sending-authorization-header-on-gateway-introspection-query~e8c3c16a-07b7-464a-97f5-13f577591bb9

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
brandonpapworthcommented, Jul 16, 2019

This would be quite helpful, but I also see it as useful for us to possibly configure the actual method used to communicate with the service. One might want to use lambda.invoke as opposed to fetch, and all we would need is to provide a function that implements a similar API.

I have patched the Apollo Gateway in my own codebase to facilitate my desire for leveraging lambda.invoke (why add an API Gateway layer if I don’t need it? 😄 ) with some of the services, ensuring to construct the context object to be properly accepted by the apollo-server-lambda handler.

2reactions
ElliotChongcommented, Jun 25, 2019

I just ran into this issue today (my service requires a particular header), FWIW it would be nice to be able to manipulate headers on a per-service basis rather than just globally. Perhaps as a headers prop that can be included alongside name and url?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why You Should Disable GraphQL Introspection In Production
In this post, we'll discuss why we believe you should disable GraphQL introspection in production, how to do it, and present a way...
Read more >
node.js - Apollo gateway not picking up managed federation ...
UnhandledPromiseRejectionWarning: Error: When serviceList is not set, an Apollo Engine configuration must be provided. I've been following ...
Read more >
Validating Access_Tokens Through the Introspection Endpoint
Set up AM: Select Applications > Agents > Identity Gateway, add an agent with the following values:.
Read more >
Apollo Federation specification - Apollo GraphQL Docs
Schema composition at the gateway requires having each service's schema, annotated with its federation configuration. This information is fetched from each ...
Read more >
The complete GraphQL Security Guide: Fixing the 13 most ...
You should not trust any GraphQL library without heavy testing, ... Playground use the introspection Query to then be able to give the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found