strawberry-graphql / strawberry-django

Strawberry GraphQL Django extension
https://strawberry.rocks/docs/django
MIT License
404 stars 117 forks source link

Queries not working with strawberry-graphql==0.121.0 #152

Closed edomora97 closed 2 years ago

edomora97 commented 2 years ago

Describe the Bug

Using the last stable release of strawberry-graphql (0.121.0) all the queries fail with:

{
  "data": null,
  "errors": [
    {
      "message": "'NoneType' object has no attribute 'colors'",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "colors"
      ]
    }
  ]
}

With strawberry-graphql==0.120.0 everything works fine.

Reproducing

It's enough to use the example project in this repo at examples/django.

Adding strawberry-graphql = "==0.121.0" to pyproject.toml and running poetry update makes the above error happen. With strawberry-graphql = "==0.120.0" the error is not present.

System Information

Additional Context

Release 0.121.0 contains a single commit coming from https://github.com/strawberry-graphql/strawberry/pull/2037.

Upvote & Fund

Fund with Polar

patrick91 commented 2 years ago

Ciao @edomora97! I have a PR that should fix this here: https://github.com/strawberry-graphql/strawberry/pull/2038 😊

devkral commented 2 years ago

can't we lock the version to strawberry <0.121 as quick fix until the issue is resolved?

edomora97 commented 2 years ago

I can confirm that with 0.121.1 everything works again.

patrick91 commented 2 years ago

@devkral should be ok now!

we'll try to find some ways to make sure we don't break strawberry django in future, sorry about the breakages 😊

I'll close the issue, let me know if there's any other problems :)