-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
[FEATURE] suggestions for gqlFelds #596
Comments
Aha, a good case. Thanks! I'll try to provide a fix for it next days, but might take 1-2 weeks. |
I'm very sorry. It took a while. Now I'm back and working on the issue. |
satanTime
added a commit
that referenced
this issue
Jun 4, 2021
satanTime
added a commit
that referenced
this issue
Jun 4, 2021
Hi @vladimirdrayling, could you verify that the change does what you expect? const user = rootEntitySelector(userFeature, {
gqlFields: {
id: '',
firstName: '',
lastName: '',
permissions: '{key level}',
},
}); |
satanTime
added a commit
that referenced
this issue
Jun 4, 2021
satanTime
added a commit
that referenced
this issue
Jun 4, 2021
satanTime
added a commit
that referenced
this issue
Jun 4, 2021
satanTime
added a commit
that referenced
this issue
Jun 4, 2021
feat(graphql): selecing sub sets and interfaces along with fields #596
v1.6.0 has been released and contains a fix for the issue. Feel free to reopen the issue or to submit a new one if you meet any problems. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue
No typing for gqlFields
Possible sulotion
Provide an
ENTITY
adjust
rootEntitySelector.ts
by providing theENTITY
toSELECTOR_META
=>SELECTOR_META<ENTITY>
.This is how it might look after compilation:
Profit and a happy developer:
We don't need to guess the entity props any more.
Use all entity props without providing'em all in
gqlFields: ['id', '...']
Is it possible to make the
gqlFields
little more dynamic? For example explicit withgqlFields: 'all'
or implicit ifgqlFields
is not provided, all the entity props are used to generate a graphql query/mutation/subscription.The only question is, how to handle nested props like:
Maybe it'd be even cooler with this approach like in
prisma
would generate following graphql query
The text was updated successfully, but these errors were encountered: