Comments (9)
I run into the same issue. It seems that resolveFieldsAndImports()
in generate.js explicitly filters out fields with arguments.
Line 297 in 0839161
Is this necessary, is there any reason for this behaviour? If so, then can this be made optional?
from mst-gql.
I'm not sure if there is a reason behind this (@mweststrate?) and haven't had a chance to dig in myself yet.
from mst-gql.
Until someone can clarify this I added a --allowFieldArgs option to the generator and created a pull request in case this turns out to be useful.
from mst-gql.
@beepsoft does it seem to work without issue with args?
from mst-gql.
Yes, in my app it seems to generate the approriate definitions and when querying via the store it fills these properties correctly. In my cases these are arrays of objects. If the type is specified as root with --root Foo
then I get
bar: types.optional(types.array(MSTGQLRef(types.late(() => FooModel))), [])
otherwise
bar: types.optional(types.array(types.late(() => FooModel)), [])
I think that's how it is supposed to work.
from mst-gql.
If this is the case I see no reason not to make it the default :)
from mst-gql.
Yep. :-)
from mst-gql.
@chrisdrackett Can you please fix this by deleting that filter line?
from mst-gql.
Iām currently out of town. The earliest I could get to it is Tuesday.
from mst-gql.
Related Issues (20)
- How do I update data from server? HOT 1
- before / after request query hooks
- useQuery is not reactive HOT 3
- How to intercept gql http errors. HOT 1
- Circular dependency on scaffolding HOT 1
- Query action takes more time than plain fetch request HOT 1
- yarn test:cra fails with TS errors HOT 1
- feat(config): Prefer gqlWsClient over gqlHttpClient when the client's Websocket is active HOT 1
- Discord server and better communication HOT 13
- types.late always typed as any HOT 1
- TypeError: Cannot read property 'endsWith' of undefined HOT 2
- Complex filters handling using generated code
- Is it possible to have local-only queries/mutations? HOT 4
- [name]ModelSelector requires passing 'undefined' instead of empty for non-primitive fields HOT 1
- Locally instantiated model causing "Failed to resolve reference" error
- Scaffolding tool breaks on multidimensional array types
- How to add HTTP header to one request? HOT 1
- Partial data returned is ignored?
- New maintainer HOT 2
- v0.17.2 is released
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 mst-gql.