-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Nested Query Fields ("folders" to better organize related fields) #580
Comments
Can you give more information about this, with examples if possible? |
with this query: query MyQuery {
param {
equip {
edges {
node {
id
}
}
}
}
} this don't work: @strawberry.type
class Param:
equip: ListConnectionWithTotalCount[types_.Equip] = strawberry_django.connection()
@strawberry.type
class Query:
param: Param = strawberry.field() but this (with a custom resolver) work : @strawberry.type
class Param:
equip: ListConnectionWithTotalCount[types_.Equip] = strawberry_django.connection()
@strawberry.type
class Query:
@strawberry.field()
def param(self, info) -> Param:
return Param(equip=types_.Equip.__strawberry_django_definition__.model.objects) ( i get the model manager from strawberry_django_definition 🤪 but i think you have it ) |
Is @strawberry.type
class Query:
param: Param = strawberry_django.field()
# or if you are using relay and Param inherits from Node
param: Param = strawberry_django.node() Let me know if that works |
No, |
@bellini666 i see that you have taged this "help wanted", I renamed this issue by adding |
Is there a simple way to move fields that are in base Query Into subfields to namespace/organize them ?
(I keep running into issues. 😓)
Upvote & Fund
The text was updated successfully, but these errors were encountered: