📜

Open-source updates
26 July 2021

This week we merged a big PR that improves the internal structure of Strawberry making it easier to maintain and to use programmatically. Plus more updates :)

# Internal refactoring

Really excited about the work that Bryce has been doing on the internals of Strawberry; Now the internal structure of Strawberry is easier to update and also easier to use programmatically, I feel like this might lead to interesting integrations.

There's still some work to do, but this was probably the biggest the biggest piece that we had to tackle.

With this update I found a couple of issues we had at work, we were returning the wrong type in a couple of places and also had a few duplicated types.

Something I want to focus on next is making sure that these errors are easy to spot and fix.

We also had to make a couple of releases to fix issues related to type hints. MyPy is very useful, but sometimes it is hard to work with it, especially when making plugins; hopefully things improve in future

https://github.com/strawberry-graphql/strawberry/pull/906

# Optional camel-casing

The other “big” improvement is the ability to disable auto camel-casing for fields and arguments. This was requested a while ago but I wanted to wait for Bryce’s PR to land before doing this.

We also took the opportunity to thing how we can handle configurations; we settled on allow users to pass a configuration parameter when creating schemas, like so:

schema = strawberry.Schema(
Query,
config=StrawberryConfig(auto_camel_case=False)
)

I really like this approach as you can have multiple schema with different configuration without any issue.

I’m also thinking how we could use StrawberryConfig to disable/enable features that could be breaking changes, so you could adopt a new version of strawberry without having to change a lot of code, in the case we introduce a breaking change. We’ll see how that goes :)

https://github.com/strawberry-graphql/strawberry/pull/798

# Bug fixes in federation

I also found a small bug in our federation implementation and fixed it. Nothing major, but I think we'll change how directives are printed in future so we can decouple them from federation and also allow to have new directives that are printed on the schema.

https://github.com/strawberry-graphql/strawberry/pull/1068

# Twitter

A few weeks ago we also opened our twitter account: https://twitter.com/strawberry_gql

We will mostly use it for announcing new releases. I'm currently working on automating the tweets when a new release is publish; currently we only have a generic message and I'd like to get a tweet with actual information about the release.

# Fin

Hopefully these updates are useful, they definitely keep me more motivated to work on Strawberry and related open source projects :)

If you have questions feel free to tweet at me or join our discord channel: https://strawberry.rocks/discord

See you next week!


Written at Stones Bakery .

Webmentions

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