Closed danielmcquillen closed 10 months ago
Hi @danielmcquillen ,
Yes it is possible. You probably want to use something like this:
@strawberry.input
class ComponentIdInput:
equal_to: str
@strawberry.input
class WhereInput:
component_id: ComponentIdInput
@strawberry.type
class Query:
@strawberry.field
def some_specific_ABC_query(self, where: WhereInput) -> ABCType:
# access it with where.component_id.equal_to
...
(Sorry for posting basic question here...if there's a forum or other gathering place please let me know... happy to move this question there.)
Np! :)
But yeah, we have a forum at discord for questions like this: https://strawberry.rocks/discord
@bellini666 Thanks for the info!
Thanks for this great project.
I want to use it to add GraphQL support...but I need to support a graphQL query that implements a let's say
someSpecificABCQuery
query that has a shape like:and at the moment I can't figure out if I can support this structure (that enclose the 'where' clause with "equalTo" term in parenthesis) or not using strawberry-graphql-django.
Unfortunately this format can't be changed...although I wish it could as, from what I understand, GraphQL best practices have evolved, could be much simpler.
Is it impossible to support this particular format, with the where dictionary as an argument to the query, using strawberry-graphql?
(Sorry for posting basic question here...if there's a forum or other gathering place please let me know... happy to move this question there.)
Upvote & Fund