Comments (8)
This is intended, as Relay needs to understand how the argument values of the root field correspond to the response values. We've solved this by limiting the flexibility of the root field, but it is possible that we could remove this limitation.
Can you describe an example use-case where multiple arguments would be valuable?
from relay.
In my situation, I have a route with two variables (/:moduleSlug/:tutorialSlug
), both required to resolve the query. I was trying to pass them to a tutorial(module: $module, tutorial: $tutorial)
root query.
The INPUT_TYPE seems like it will work for now, but not ideal. Let me know if you have another idea for how this could be solved.
from relay.
How about lists and connections as root fields? That is also limited, right?
from relay.
Never mind, input objects don't work here either (Unexpected arg kind: ObjectValue
)...
from relay.
@devknoll this might be a bit hacky, but have you tried getting that root query to take in a string and JSON.stringify the two variables?
@jardakotesovec Correct, connections can not be root fields at the moment. As @josephsavona mentioned, we might be able to remove these limitations
from relay.
@yuzhi So, I think in my own case, I might just change my urls to be less hierarchical (they are getting ridiculous as is...).
But lots of folks do use hierarchical urls, so it seems like a restriction worth removing, if possible.
from relay.
See #112 for more detailed explanation.
from relay.
Thanks yuzhi. I'll close this one so the discussion can move there!
from relay.
Related Issues (20)
- graphql-syntax: Parser crash `graphql_syntax::parse_document_with_features` HOT 2
- Publish Relay vscode extension v2.1.0 HOT 9
- graphql-syntax: Parser crash parse_document_with_features (internal error: entered unreachable code)
- [lsp] Find field references not always working HOT 2
- graphql-syntax: Parser crash parse_document_with_features (assertion failed: start <= end)
- How to create environment factory HOT 4
- optimisticUpdater has invalid signature
- optional field in array is generated as not undefined but nullable
- TS2786: 'RelayEnvironmentProvider' cannot be used as a JSX component. HOT 1
- Support for React Server Components HOT 9
- [relay-lsp] Add a refactor to turn global variable into explicit fragment argument HOT 1
- babel eagerEsModules, ESM Modules, and missing file extensions
- Async RecordSource methods mentioned in docs but don't seem to exist
- Client schema interface extension are not taken into account by the compiler
- relay-runtime 15.0.0 ConnectionHandler.getConnection() is undefined HOT 2
- Server Exception in Tutorial Newsfeed Example HOT 1
- Code examples on website are hard to read in dark mode
- eslint-plugin-relay README should say that the source of truth is this repo HOT 1
- Relay compiler fails when using custom scalars [16.2] HOT 3
- Loading data inside of hooks VS loading data outside of hooks?
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 relay.