I made a small project that has an Elixir Phoenix Absinthe Relay backend and an Expo React Native frontend.
All it does is let you upload images of “things” but it has some nice stuff:
- subscriptions - new “things” with “logos” will appear to other people.
- paginating - preserved with new data from the subscription
- mostly websocket - I hacked a custom relay environment that checks if there are uploadables. If there are uploadables, it does a normal HTTP multipart form request. If not, it just uses the websocket.
This project is just meant to act as a reference for myself and other people using Absinthe Relay and Expo. It’s not pretty, it has no security and it’s pretty much useless IRL.
I’m putting it on this forum for posterity. Maybe it will help somebody trying to get image uploading working with Absinthe Relay connections.
I deployed it! https://absimupo.peacefulprogramming.dev/
Anyone is free to upload any image for a while! Please don’t abuse it.