Querying relations through GraphQL
I noticed that GetManyInput does not have a relations key, and it doesn't seem like there is an automatic way (or manual way) to specify which relations should load, so they are being returned as null when requested through queries. Is this something that is to be implemented?
I'm assuming something needs to be updated about getConditionFromGqlQuery to have relations properly returned.
Hello @hcharley , first of all, thank you for your interest in my repository.
As you mentioned, in my repository, to solve the GraphQL n+1 problem, It has been designed to extract TypeORM's Select and Relation statements from a GraphQL query.
Previously, the system was designed to manually specify relations, but it has been updated to automate this process through a new logic.
You can see the related PR here And as you mentioned, the related file can be found here
For instance, if a User and Lecture are in a 1:n relationship and the query includes Lecture, then Lecture will be joined from the db, and if not, it won't be joined.
If you understand this situation but still find something wrong with the operation, please share the relavant code. it would be very helpful, though I know it might be a hassle.
Thank you.