def test_field_type_priority():
    """Prioritise the field annotation on the class over the resolver annotation."""

    def my_resolver() -> str:
        return "1.33"

    @strawberry.type
    class Query:
        a: float = strawberry.field(resolver=my_resolver)

    schema = strawberry.Schema(Query)

    expected = """
    type Query {
      a: Float!
    }
    """

    assert print_schema(schema) == textwrap.dedent(expected).strip()

    query = "{ a }"

    result = schema.execute_sync(query, root_value=Query())

    assert not result.errors
    assert result.data == {
        "a": 1.33,
    }
Prioritise the field annotation on the class over the resolver annotation.
tests/schema/test_fields.py