Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add allowFieldArgs #86

Merged
merged 1 commit into from
Sep 11, 2019
Merged

Add allowFieldArgs #86

merged 1 commit into from
Sep 11, 2019

Conversation

beepsoft
Copy link
Collaborator

Fields with arguments are ignored by default by the generator. With
--allowFieldArgs one can have approriate definitions generated for
such fields as well.

Fixes #46

Fields with arguments are ignored by default by the generator. With
--allowFieldArgs one can have approriate definitions generated for
such fields as well.
@@ -294,7 +295,7 @@ ${generateFragments(name, primitiveFields, nonPrimitiveFields)}
let modelProperties = ""
if (type.fields) {
modelProperties = type.fields
.filter(field => field.args.length === 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why this line was here in the first place (@mweststrate) but if things work fine without it I'm all for just removing it entirely vs. adding an allowFieldArgs option.

Copy link
Contributor

@scherler scherler Sep 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm yeah, I thought maybe originally it was meant as field.args.length !== 0 but does not make sense either down the line. I agree @chrisdrackett just drop only that line (would as well reduce all the unrelated formatting changes) :trollface:

@chrisdrackett
Copy link
Collaborator

closing due to duplicate #90

@chrisdrackett chrisdrackett merged commit 3ce41bd into mobxjs:master Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

relations with arguments not showing up on model
3 participants