When I first setup this computer, I installed Rails using the system version of Ruby (v2.6.3, it seems). Weeks later, I made the following changes:
- installed rbenv to install Ruby 2.7.0
- Set the
.zshrcfile to avoid needing
sudowhen installing gems
Rails generators and commands kept pointing to the original version of Ruby until I ran
sudo gem install rails. I’m still not sure why I needed to run it using
Rails convention is to use
snake_case. GraphQL convention is to use
camelCase. I spent nearly 30 minutes trying to figure out why my
gql query was failing, and it’s entirely due to the mixing of case conventions between the two.
Seems that the norm is to have a huge
query_type.rb file which is really strange to me. The graphql-ruby maintainers liken the query type file to a routes.rb type of file since it’s handling all of the requests. Regardless, I still think there should be a simple way to break it up. All of the potential solutions I tried either relied on a previous version of
graphql-ruby or just didn’t work.
This personal project I’m working on is a music player - why not model this initial database using the Spotify schema?