In which I try out GraphQL and research other components of my app

Rona Chong
4 min readSep 18, 2017

Hey strangers and friends!

The research phase continues.

some simple Google queries from this week

What’s that? You don’t know what I’m talking about?? You want to know what this fantastic research process is all about? Well, for context, here are the previous RETRO not POSTMORTEM posts in this amazing blog series:

Without further ado, here’s my usual breakdown of the week.

What did I set out to do?

My goal for the week was to “finish upfront research for project and take a stab at setting up stack for project; ask my stack questions to mentor.”

For this week I assigned myself the following tasks for research:

  • getting through the remainder of Learning React by O’Reilly (overflow from the previous week)
  • finishing Airbnb’s best practices recommendations for Javascript
  • researching web performance strategies, including how to achieve lazy loading inside React
  • looking into how I would implement oauth for my app
  • determining any particularities for deploying a django web service via Docker
  • determining any particularities for using Docker with EC2 (the cloud platform I plan on using for moshi-mochi.com)

+ the usual outreach to my mentors with questions on anything I looked into.

On the dev/ops side, I asked myself to add appropriate linters to my text editor and get started trying to set up my stack in prod.

What did I end up getting done?

  • getting through the remainder of Learning React
    🙆
  • finishing Airbnb’s best practices recommendations for Javascript
    🙅 I skipped this one in favor of looking into some other topics
  • researching web performance strategies/how to achieve lazy loading inside React
    🤷‍♀️Kind of, but I only achieved a general sense of what might work— Relay/Apollo provides paging functionality to continually load new data/content
  • looking into how I would implement oauth for my app
    🤷‍♀️I started researching this but I’ll need to look into things more before I can implement it, or openid
  • determining any particularities for deploying a django web service via Docker
    🙅 I skipped this in favor of looking into other topics
  • determining any particularities for using Docker with EC2 (the cloud platform I plan on using for moshi-mochi.com)
    🙅 Also skipped this in favor of looking into other topics

Other areas of research that I didn’t anticipate but went into this week:

  • How to set up a GraphQL server with Django and query it (GraphQL documentation, Graphene documentation, graphene_django documentation, Relay documentation)

And I actually spent half of this week trying things out in Django!

I also sent a few questions to my mentors per usual.

What went well / What was difficult / What I would do differently next time

What went well:

Overall I felt successful at working more consistently this week, with 22.75 hours of focused work. Came in earlier to school and stayed later when things came up.

Trying things out in Django (and also initializing my React project) means I have a slight head start ahead of where I planned on being dev-wise at this point, since I planned on taking my first stab at those things later. Although some things took a while to sort out, over all the “stab” went smoothly and I have a good sense of the basics for the Django-side.

Less agonizing over my questions before sending them over to my mentors, which means less time lost! I spent maybe 30 min to an hr every other day on question-related matters, as opposed to half the week ish. (´・ω・U)

What was difficult:

I originally planned to work on setting up my stack this week but ended up reprioritizing (to try the GraphQL stuff instead). Not a big deal but it just means I’m shifting some things around. Another interesting aspect was being tugged towards learning to use Apollo for caching/state management with GraphQL queries by the Redux and starter kit ReactQL while conversely being pulled towards using Relay by graphene_django. I’m still trying to figure out if it makes any sense to use the former on the client side while using Relay for schema-related stuff on the server side, or if I’ll have to woman up and commit to using one.

Did I mention planning and committing time learning how to follow certain conventions and use certain solutions like Django Rest Framework ONLY to realize later that I actually prefer to use a totally different solution (GraphQL)?? That was an OTZ moment.

In general, juggling between the instinct to go for more advanced and ideal solutions (implementing SSR, caching, oauth, paging, etc.) and knowing when I should stick to the barebones instead. It’s hard because a slick and beautiful user experience is a big part of what moshi-moji is supposed to offer, but I may not have time to do all of that.

What I would do differently next time:

There must be something, but I can’t think of anything at the moment. Still working on the “let’s put more hours in” idea.

One cool thing I learned about

GraphQL as an alternative to REST API and its advantages (less round trips, more frontend-dev friendly); how Relay is analogous to React in that it compiles a ‘tree’ of queries needed to render the view.

And now,

Misc links for your browsing pleasure:

--

--