-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Active Storage support #1777
Comments
No, not supported by graphql-ruby yet! Actually, I haven't even looked at ActiveStorage yet 🙈 |
For other people seeing this, I am converting it to an array type as a temporary work around. |
It would be very nice to have active storage support! |
@KevinColemanInc can you elaborate a bit? Maybe a snippet of your type definition? |
you can call |
I did something like this to get the image url, is this ok?
|
This would cause an N+2 for each type. Rails will do:
If speed isn't important or you're not loading very many post types, your solution might be tolerable. |
As far I can see,
I haven't fully tested this but being using this method for some time now. I can create a PR if needed To solve the N+1 issue, just use the batch gem. |
Thanks for sharing your solution! If someone wants to contribute first-class support for ActiveStorage, I'm happy to review a PR for it. |
``
This Looks like a quick solution although use 'object' to access the current object rather than query on id |
I am running
1.7.14
, so maybe1.8
supports this already.The text was updated successfully, but these errors were encountered: