-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
relations with arguments not showing up on model #46
Comments
I run into the same issue. It seems that Line 297 in 0839161
Is this necessary, is there any reason for this behaviour? If so, then can this be made optional? |
I'm not sure if there is a reason behind this (@mweststrate?) and haven't had a chance to dig in myself yet. |
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. |
@beepsoft does it seem to work without issue with args? |
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 then I get
otherwise
I think that's how it is supposed to work. |
If this is the case I see no reason not to make it the default :) |
Yep. :-) |
@chrisdrackett Can you please fix this by deleting that filter line? |
I’m currently out of town. The earliest I could get to it is Tuesday. |
I have a schema that looks like the following:
but after running
mst-gql
I get the following:I found that if I remove the args MST picks things up correctly. For example if I change followers to be
followers: [User!]
I then see it correctly in my store:followers: types.optional(types.array(MSTGQLRef(types.late((): any => UserModel))), []),
I don't actually use these args, so I can remove them from the generated
schema.graphql
but I would need to setup a script or similar to do this every time the file is generated.The text was updated successfully, but these errors were encountered: