Comments (8)
@harshmttl @ihac we're currently working on fixing a number of issues related to this. We'll release a new Bramble update in a week or two that should solve this.
from bramble.
Hi @ihac
This should work, bramble currently has no protections against query complexity other than a timeout on execution time, so recursing down to dependent services should be fine.
I'm assuming you've cut out the fields on Query
for looking up the @boundary
types in the example schemas.
Can you share these example services so we could run a test with them?
from bramble.
Hi @pkqk here is the repo: https://github.com/ihac/graphql-poc-playground/tree/master/bramble-federation if you wanna run a test.
And below are some failed queries (we expected them to work though):
query {
randomContentWithScoreCard { # resolved by content service.
id
title
score { # resolved by social service
teamAScore
teamBScore
ads { # should be resolved by ads service
id
message # cannot query field "message" on type "TinyAdsBanner"
}
}
}
}
# Same issue as above
query {
masthead_v2(count: 10) { # resolved by masthead service
__typename
contentItemsWithScoreCard { # resolved by content service
id
title
score { #should be resolved by social service
id
teamAScore # cannot query field "teamAScore" on type "ScoreCard"
}
}
}
}
Also, we tried the federation on union types, but it didn't seem to work. Is this as we expected as well?
query {
masthead(count: 5) {
__typename
... on ContentItem {
id
title
}
... on ContentItemWithScoreCard {
id
title
}
... on ScoreCard {
id
}
}
}
The query above even caused a panic in Bramble: runtime error: invalid memory address or nil pointer dereference
when it tried to marshal the result into response.
Thanks for help and also your great work!
from bramble.
Any updates here?
from bramble.
To clarify – the issue title questions the support for multi-sourcing field across schemas (which is slightly inconvenient but not really broken), whereas the issue discussed here (that I also quickly ran into) is with graph traversal. The traversal issue is in the works?
from bramble.
@ihac – I suspect that your report about abstract type failures (unions) may be related to #81 based on your query. I haven't been able to trigger panic, but panic itself may be a side effect of your logging.
from bramble.
@ihac — the original issue that you reported with deeply-nested fields not delegating properly was a big problem that I also ran into quickly. There’s a fix in the works here #85.
from bramble.
@gmac Thanks for the quick fix. Yes the issue title might be ambiguous as we're actually discussing about the graph traversal here.
As for the panic, it happened only when we queried the federated union types. I'll try once again to see whether I could reproduce it with your recent patches included.
from bramble.
Related Issues (20)
- Request syntax error while trying to upload file HOT 5
- persisted queries HOT 1
- using Bramble as a library, add query/mutation resolvers in the gateway HOT 3
- Fragment not mapping fields for interface types HOT 7
- Lack of server timeouts HOT 1
- should bramble complain about built-in directives declared in spec? HOT 4
- Enabling/Disabling schema introspection HOT 6
- Types not used in any query are not getting into compiled schema? HOT 2
- Plugin` configuration doesnt depend on config changes HOT 3
- Differentiate log level depending on "response.status" HOT 4
- Schema being cached? HOT 1
- OperationPermissions dependent on type ID HOT 1
- Cannot access timings HOT 3
- nested abstract fragment error if returned type not queried HOT 5
- Bramble fails to read scheme HOT 2
- Rate limiters on Bramble? HOT 1
- Strict-Transport-Security on Bramble? HOT 1
- Add Datadog graphql trace HOT 8
- Config.json not loaded with docker volume HOT 1
- Allowed headers does not reach sub service HOT 3
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 bramble.