Closed banakh closed 1 month ago
Thanks for reporting this! I think #1130 is a slightly more elegant approach as it addresses the core issue directly. It feels a bit strange to me to have an arbitrary argument act as a label for a list instead of just having a way to embed that label in the actual object returning the list
I'm closing this in favor of #1130
@AlecAivazis from our experience (having a non controlled GraphQL environment) it's hard to add __id
field, but definitely being able to specify custom id fields works better for us
Describe the feature
Description:
Currently, in HoudiniGraphQL, when working with a list of messages tied to a specific parent entity (like tickets), we have to manually pass the @parentID in mutations when inserting new records. This can result in unnecessary complexity and redundant joins, especially when the parent-child relationship is straightforward.
For example, when fetching ticket messages in our application, we currently have the following setup: Current Query:
Current Mutation:
Proposed Improvement:
The proposal is to allow querying the messages directly, without needing to go through the parent ticket entity. This simplifies both the query and the mutation by eliminating the need for manually specifying @parentID.
Proposed Query:
This allows fetching the messages directly using the documentTemplateTicketId without having to reverse the relationship to the ticket itself.
Proposed Mutation:
Benefits:
Conclusion:
By implementing this improvement, HoudiniGraphQL will be able to handle lists more intuitively, reducing the need for manual @parentID specification in scenarios where it's unnecessary. This will improve both developer experience and performance.
Criticality
nice to have