Skip to content

Commit

Permalink
Expand readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalp committed Oct 5, 2024
1 parent 3c0bbef commit f4a6c65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ This API aims to use ALL features from GraphQL Modules v2. It can also be used a

`list` is [invariant in mypy](https://mypy.readthedocs.io/en/stable/common_issues.html#variance). A list of `type[GraphQLObject]`, like one from the `example.queries.__init__` produces an error because `list[type[GraphQLObject]]` is incompatible with `list[type[GraphQLType]]`.

Replacing `list` with `Iterable` may be enough to fix this.


## Resolvers need to be `@classmethod` or `@staticmethod` to keep linters happy.

Linters will scream that resolver method decorated with `@ObectType.resolver` is missing `self` first attribute.

This may require mypy plugin to fix, but its good idea to look how Graphene and Strawberry are solving this.

0 comments on commit f4a6c65

Please sign in to comment.