graphql-python / graphene-federation

Federation implementation for Graphene.
MIT License
40 stars 10 forks source link

TypeError: 'type' object is not subscriptable #9

Closed mahdyhamad closed 1 year ago

mahdyhamad commented 1 year ago

Environment:

Steps to reproduce:

Stacktrace:

File "/.../django-project/venv/lib/python3.8/site-packages/resources/schema.py", line 10, in <module>
    from graphene_federation import build_schema
  File "/.../django-project/venv/lib/python3.8/site-packages/graphene_federation/__init__.py", line 1, in <module>
    from .main import build_schema
  File "/.../django-project/venv/lib/python3.8/site-packages/graphene_federation/main.py", line 7, in <module>
    from .service import get_service_query
  File "/.../django-project/venv/lib/python3.8/site-packages/graphene_federation/service.py", line 8, in <module>
    from graphene_federation.provides import get_provides_parent_types
  File "/.../django-project/venv/lib/python3.8/site-packages/graphene_federation/provides.py", line 22, in <module>
    def provides(field, fields: Union[str, list[str]] = None):
TypeError: 'type' object is not subscriptable
erikwrede commented 1 year ago

Hey, can you please add some code & stacktrace info? Not every project on federation 3.0.2 breaks.

mahdyhamad commented 1 year ago

Pull request to solve the issue: https://github.com/graphql-python/graphene-federation/pull/10