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

How to get the full object, not only primitive fields? #386

Open
chertkovalex opened this issue Jul 20, 2022 · 2 comments
Open

How to get the full object, not only primitive fields? #386

chertkovalex opened this issue Jul 20, 2022 · 2 comments
Assignees
Labels
question Further information is requested
Milestone

Comments

@chertkovalex
Copy link

xxxPrimitives is great and save a lot of coding.
But in our case we have a pretty big objects having several nested objects on several levels.
So currently need to create a query with queryBuilder, importing all the primitives from all the nested objects.
And it happens dozens of times.
Is there any possibility to request not only primitives, but the whole object including nested objects and fields?
Maybe it can be some flag, parameter etc?

@dmytro-shpak
Copy link
Contributor

I think in that case you will face the circular dependencies problem. Could you show the example of such functionality in other frameworks?

@krstns
Copy link

krstns commented Jul 22, 2022

you might need to create a single root store with all of our models (there's another circular dependency issue pointing to a script that can help you make that).
The way to retrieve data from other edges is described in the docs (search for selectors).
Keep in mind that your graphql server may have a limit of nesting.
I would discourage using the primitives. Unfortunately, each time you use them and add more selectors, the original string is appended and you will end up with multiple duplicates of selectors.

Good luck :)

BTW. my experience is related to using version 15, I am going to test the 17 but I doubt any corrections were made regarding circular dependencies.

@Benz19 Benz19 added the question Further information is requested label Nov 5, 2022
@jesse-savary jesse-savary added this to the v0.18.0 milestone Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants