Comments (5)
@cyberhck This issue is about building out a particular feature, not a general conversation about how the Gateway and Router will work similarly/differently or precisely how the all the same functionality will be offered — those are going to be their own specific conversations which live in different tickets. I don't personally think it did, but if what I said above suggested to you that something was changing about the way the Router will work in terms of general design principles, I didn't mean to convey that! 😅
I'll briefly try to explain some of our intent but still want to note that, unless I'm misunderstanding, I think any larger conversation about this is probably off-topic for this issue:
As this particular issue suggests itself, much like the Gateway, functionality in the Router will sometimes be implemented natively, sometimes via configuration and other times there will be other avenues (e.g., extensions of sorts). It's worth noting that the Router is written in Rust, not Node.js, so implementations will vary from what you have today.
One hope here is that the Router might offer improved solutions over implementations in the Gateway, or solutions that necessitate less complexity. CORS header configuration is just one example. Of course, if you're comfortable writing Rust, you're certainly able to use this as a library: This is the Git repository that you'd checkout to make any customizations you'd necessitate that we haven't built solutions that don't require compiling your own binary. Feel free to do that, but we definitely hope that everyone doesn't need to always compile the Router to use it though, and exploring configuration is a way to potentially avoid that.
Hope this helps alleviate any concerns you had!
from router.
I thought we'll be able to use router as a library where we can do everything that can be done with apollo gateway today in nodejs, I'd think it'd be a middleware. Is that not the case anymore?
from router.
I feel like now that we're closing in on extensibility, we might give this one a go!
from router.
The Router now supports Regex configuration of CORS origins based on the work in #1444. The remaining piece of this issue is now entirely to allow something more dynamic by enabling Rhai to be used to selectively enable or disable CORS based on other context (like request headers, an external network request, or something along those lines).
from router.
We'll close this for now as the flexibility you can get with regex for CORS is actually pretty good for most cases but feel free to open a new issue if your needs don't match what's currently offered. thanks!
from router.
Related Issues (20)
- Misleading validation error when float value returned from subgraph for Int! field
- Granular Spans for Coprocessors
- Improving `format_response` performance
- Metric combining `apollo_router_processing_time` and `apollo_router_query_planning_time` for requests that require query planning HOT 3
- subscription: Ping message over graphql-ws protocol contains invalid payload
- 400 Bad Request when request.body.extensions=null
- Helm chart: allow specifying extraEnvVars as a map
- Allow disabling introspection responses going to cache HOT 1
- Allowing an instrument selector to impl Drop
- Lock introspection to a specific query
- Coprocessor health check as part of overall router health
- Forward GraphQL request extensions to subgraphs with YAML
- Entity cache: make the common redis configuration option visible
- Redis: add an exponential backoff on reconnection
- Entity cache: only cache data if the subgraph returns a Cache-Control header or if a TTL is configured
- Warm up 100% of operations for query planning HOT 1
- Timed out subgraph requests do not trigger `SubgraphResponse` coprocessor requests HOT 1
- Header added to request in rhai does not propagated into logs trace_id field HOT 3
- QUERY_PLANNING_FAILED related to multiple @key directives
- Apollo Router query plan is different vs @apollo/gateway and causes an error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from router.