Repository: strawberry-graphql/strawberry

Issue:
`dacite` library doesn't compatible after 0.69.0 strawberry-graphql. (unhasable type 'StrawberryOptional' problem)
I have a regression issue with StrawberryOptional (breaking changes in 0.69.0) 
When I use dacite library to convert dict to strawberry.type class instance, it works in 0.67.x version. 

```
from dacite import from_dict

@strawberry.type
class Tag:
    tag_id: int = None
    category: str = None
    images: List[str] = None

    @strawberry.field()
    def image(self, info: Info) -> Optional[str]:
        ...

from_dict(data_class=Tag, data=dict(tag_id=34, category="song", images=["a", "b"]))
// same with Tag(tag_id=34, category="song", images=["a", "b"]) 
```

`dacite.from_dict` method convert `dict(**attributes)` to `Tag(tag_id=~, ...)` automatically. 
It makes ORM model instance <-> Strawberry type instance conversion easily. 

After upgrade, it occur an error unhashable type: 'StrawberryOptional'  because of Optional[str] type. 

Can we make `StrawberryOptional`, `StrawberryList` to be hashable type to use dacite.from_dict ? 
Or is there any alternative way to convert dict to strawberry.type instance?




Discussion:
@leo6104 Can you retry with `@strawberry.field` instead of `@strawberry.field()`?
> @leo6104 Can you retry with `@strawberry.field` instead of `@strawberry.field()`?

Unfortunately, this does not help. 


@michal-cech the snippet above seems to be working, do you have a codesnippet that fails?

This works:

```python
from typing import List, Optional

from dacite import from_dict

import strawberry


@strawberry.type
class Tag:
    tag_id: int
    category: str
    images: List[str]
    image: Optional[str] = None


print(
    from_dict(data_class=Tag, data=dict(tag_id=34, category="song", images=["a", "b"]))
)
```
Example:
```python
from dataclasses import dataclass
from dataclasses_json import dataclass_json
import strawberry
from typing import Optional



def get_b(self) -> Optional['B']:
    return B(name="something")

@dataclass_json
@strawberry.type
class A:
    name: str

    @strawberry.field
    def b(self) -> 'B':
        return get_b(self)

@dataclass_json
@strawberry.type
class B:
    name: str

@dataclass_json
@strawberry.type
class C:
    name: str

    @strawberry.field
    def b(self) -> Optional['B']:
        return get_b(self)




# a works
a = A.from_dict({'name': 'name_a'})

#b works 
b = B.from_dict({'name': 'name_b'})

#c does not work due to Optional
c = C.from_dict({'name': 'name_c'})

```

Error:
```
Exception has occurred: TypeError
unhashable type: 'StrawberryOptional'
```

Resolving patch:
diff --git a/strawberry/type.py b/strawberry/type.py
--- a/strawberry/type.py
+++ b/strawberry/type.py
@@ -51,6 +51,9 @@ class StrawberryContainer(StrawberryType):
     def __init__(self, of_type: Union[StrawberryType, type]):
         self.of_type = of_type
 
+    def __hash__(self) -> int:
+        return hash((self.__class__, self.of_type))
+
     def __eq__(self, other: object) -> bool:
         if isinstance(other, StrawberryType):
             if isinstance(other, StrawberryContainer):


Test patch: