Update: I’m in the seventh week of my Outreachy internship with Fedora! I am working to create a GraphQL API for Bodhi. The following image shows a Gantt chart of the ideal timeline that my mentors and I came up with to get the project up and running:

Initial Tasks

My mentors broke down these tasks further and we decided to approach things step-by-step. The first week involved adding the /graphql endpoint that returned “Hello World”, defining the schemas, dependencies, etc. After reading the instructions given, I was able to execute them fairly quickly vis-à-vis the tasks that were to follow (or is it rosy retrospection?).

Here’s what it looked like thenceforth:

Timeline

Following Tasks

Over the next few weeks, I had to allow querying the Release class. This involved adding services, writing tests and schema definitions, and many more things.

I had to comprehend how GraphQL really functions (for instance, handling enums), while also working on tests to ensure correct responses. I learnt about graphene-sqlalchemy, graphene, GraphQL, WebOb-GraphQL, etc. The documentation for some of these is not the most eloquent. Since Release was the first ObjectType I had to deal with, it took me some time to familiarize myself with how GraphQL functions in that ambit and finalize the pull request. Needless to say, this part took some time. Now, I can apply the same understanding to querying most other classes, so that should (hopefully) be relatively easier. My mentors told me that it was okay to spend more time on said pull request because it was a fundamental one.

Present Status (Locally)

After being able to query allReleases, I had to query specificReleases using an argument. For now, it uses the id_prefix attribute as a filter. This is how it looks right now locally:

Stuff
Result as shown on GraphiQL locally

An Unforeseen Obstacle

An unanticipated hurdle I came across was when Ansible randomly stopped working on my laptop. My mentors and I spent almost an entire day troubleshooting. It eventually ran (gpg key connection is so random, but I ended up answering a related question on StackOverflow xD). There was a week in the timeline where not much coding was required and I had to “analyse the dependencies between the different objects and how these will be reflected in the GraphQL tree” and design the schema. Rather than spending a separate week trying to understand the aforementioned, it was more of a constant learning experience. So, these weeks sort of intermingled into each other, but by the end of the consolidated time, things worked out.

TL;DR:

The two tasks (of allowing Releases to be queried and planning the tree) were separated by a thin line which was inadvertently used as a skipping rope for the better. :p By the end of the consolidated time, things worked out.

Luckily, with my mentors’ (@cverna and @scoady) guidance, the execution is going according to the plan. I learnt that due to foreseen and unforeseen circumstances, it is important to be flexible in one’s timeline as a contributor. I look forward to work on the next stages: querying specific releases and introducing authentication and authorization!