📜

Open-source updates
4 October 2021

Last two weeks have been intense! I've been working on improvements for our website and as usual I've been reviewing some PRs. I also did a bit of cleanup for Hacktobterfest 😊 Oh and we now also support Python 3.10 😊

# Issues cleanup

It's Hacktoberfest 🎃 time! This means we will get some new people wanting to contribute to Strawberry this month! So I spent a bit of time cleaning up old issues and checking if labels were alright 😊

If you want to help feel free to take a look at the issues label as "good-first-issue".

# Python 3.10

Python 3.10 is going to be released this month, so we made a PR to add support for it. I had this open for quite a few months, but was waiting for dependencies to fix some issues. Now all of them seems to be working fine on Python 3.10, so I've update the PR to fix a couple of issues with Python 3.10 and to also add support for the new union syntax, which allows you to declare unions like so:

import strawberry
@strawberry.type
class User:
name: str
@strawberry.type
class Error:
code: str
@strawberry.type
class Query:
find_user: User | Error

Release is available here.

# Website improvements

I honestly can't fully remember why I did start working on this, but I always wanted a better code block for our website. I always liked Stripe's docs and always wanted to copy some of their code block features, for example being able to add inline notes to parts of the code.

This is something I've now implemented in this PR. You can see an example in action here.

Basically we are now able to highlight individual lines, individual words and add notes to parts of the code.

The code for the notes is a bit fragile, but for now it works. I have some ideas on how to improve it, but it would probably require using/writing a different syntax highlighter.

## Search support

I almost forgot about this, not having search on the website was something that came up during our monthly meeting. So I applied for Algolia's doc search and in a couple of days we got the request approved and so I implemented it in our website. It's so fast and useful, I wish I did this a while ago!

# PR reviews

Marcelo Trylesinski added a PR to better document how to use Strawberry and Starlette. We already supported Starlette using our ASGI integration, but it does make sense to have a dedicated page for this!

Michael Ossareh submitted two PRs to improve the Open Tracing support, I definitely appreciate being able to get better traces out for Strawberry!

Guillaume Andreu Sabater made a PR to fix a typo in a docstring. Always nice to see when people take time to improve things, even if it is just a tiny typo.

Jon Kim made a very useful PR to document all our extensions. We think extensions are going to make Strawberry much more flexible and powerful. Go and check the extensions out!

# Fin

I'm not doing well at doing this every week, I hope that's ok 😊

Anyway, I'm so excited about Hacktoberfest, I'm sure we'll get some nice contributions. Also can't wait to start doing some contribution to other projects myself, if I manage to make time 😊


Written at home 😊

Webmentions

No replies found! Tweet about this post, and it will show up here! ☝