drizzle-team / drizzle-graphql

Automatically generate GraphQL schema or customizable schema config fields from Drizzle ORM schema
https://www.npmjs.com/package/drizzle-graphql
Apache License 2.0
34 stars 1 forks source link

Deeply nested objects in querries not available #4

Closed anthonyhoegberg closed 1 month ago

anthonyhoegberg commented 2 months ago

Lets say i have multiple tables, with references like

User -> Post -> Message when querying post directly i can query fields of message as a sub object directly when querying user directly i can query fields of post as a sub object directly However when trying to access messages from the query of user like

User {
    Post {
      Message {
          data
      }
    }
}

Then in this cade the message object is not available on the post object, that is a child of user, maybe the code should reuse objects etc? i noticed that the users subtype of post and the post type directly aren't the same in studio sandbox

Sukairo-02 commented 2 months ago

Yes, deeply nested relations are unavailable for now, I'll implement them soon hopefully.

anthonyhoegberg commented 2 months ago

I'm not familiar with the codebase of drizzle but if there is something i might be able to help with i am willing to try, if this works out my company might use this based on my recommendation, I'm currently experimenting with different ORMs and drizzle is the most appealing one so far.

takshch commented 1 month ago

I really need this deeply nested relations.

@Sukairo-02 Can you please tell us when we can anticipate deeply nested relations?

Sukairo-02 commented 1 month ago

@takshch well, I'll be getting right back to it after I'll be done with other project I'm currently working on, and that project is a new thing for me to do, so my apologies, but I can't even provide any reasonable estimate on time it'll take to finish other than "soon".

sanandnarayan commented 1 month ago

@Sukairo-02 thats fair. May be if you can write a short brief on the logic that needs to be written and the architecture of the solution. I can try contributing to this :)

Edsol commented 1 month ago

I could contribute, too, if I can. It would be an extremely useful feature

Sukairo-02 commented 1 month ago

They are now available - v0.7.0