Dashboard Improvements: Even less GraphQL, onboarding edition

Its me again!

I’m passing by to talk about some of the internal changes we made through our dashboard so this will be a very nerdy fresh produce.

I talked previously about how we are upgrading our elixir main app from being just an UI to be a more powerful monolith and manage more things. Over the past 3 days we’ve been shipping more into that which means we’ve been using less GraphQL behind the scenes and doing more database calls. Here’s a short list:

  • Page to add credit card
  • Page to manage billing
  • Page to change Paid Plan
  • CLI login/signup
  • Launch UI
  • Organization teams page
  • Organizations list page

What do those pages have all in common? Onboarding!

The way we used to do all of them we calling some mutations and queries from our GraphQL API. That meant even simple modifications could take some work in two codebases in Ruby (:anger:) and Elixir (:heart:) and we need to deploy different things. Boo. That’s like 1 more codebase/language/deploy than it should have been.

That also meant even though our Elixir UI knew you were… well, yourself we still needed to send a token, auth on GraphQL, use dataloaders (:anger:) to efficiently fetch some data and that sounds like latency[dot]io not fly[dot]io so that also made our UI slower to you. Thankfully this is not a thing anymore.

We still did not get rid of all GraphQL stuff though, we probably wont. Our Rails code still is the owner of our tokens system so for some stuff we still need to call that API. But I glad we went down from 21 calls (totally made up number, I didn’t count) to 1~2.

Huge shoutout to @btoews for :mag_right: my tokens code and @dangra for helping me deploy some API stuff in a backwards compatible way so our CLI auth/launch can just work :tm: . Oh didn’t I mention we also made one more API in Elixir? Well, maybe another time.

See ya!

5 Likes