Giter Site home page Giter Site logo

Comments (9)

bellini666 avatar bellini666 commented on July 18, 2024

Hey @devkral ,

Is that issue happening with the v3 release?

Could you provide me a step by step on how to reproduce that traceback using your project?

from strawberry-django-plus.

devkral avatar devkral commented on July 18, 2024

Steps to reproduce

  • setup secretgraph (cloning repo and install the virtual environment with poetry install)
  • poetry run ./manage.py export_schema (here happens the crash)

from strawberry-django-plus.

bellini666 avatar bellini666 commented on July 18, 2024

@devkral

Hrm, I could reproduce the issue in your repo, but I'm not really sure what is happening there. It seems that the argument is loosing its namespace in the StrawberryAnnotation, but I don't know what is causing it. Maybe it is some weird interaction based on the fact that you do some kind of nested mutation resolving (first time seeing something like this =P).

Also, the input mutation is now using the strawberry's InputMutationExtension, so I think the issue is probably there.

Could you try to create a minimal contained reproduction example for this? It would be nice to test if the minimal reproduction example happens only with strawberry-django-plus or if it does happen when when using the InputMutationExtension directly.

from strawberry-django-plus.

devkral avatar devkral commented on July 18, 2024

thanks for the hint, did test it against InputMutationExtension. it fails with only

 updateOrCreateContent: ContentMutation = gql.mutation(
        resolver=mutate_content,
        extensions=[InputMutationExtension()],
        handle_django_errors=False,
    )

for a poc just remove all input_mutation except one in the secretgraph/server/schema/schema.py and modify it.

The command works if all input_mutations are removed

from strawberry-django-plus.

devkral avatar devkral commented on July 18, 2024

I think it is a bug in InputMutationExtension

from strawberry-django-plus.

devkral avatar devkral commented on July 18, 2024

It could be related to:
strawberry-graphql/strawberry#2864

from strawberry-django-plus.

devkral avatar devkral commented on July 18, 2024

I could fix this error by removing from __future__ import annotations. I provided a POC as test in strawberry:
strawberry-graphql/strawberry#2868

from strawberry-django-plus.

bellini666 avatar bellini666 commented on July 18, 2024

@devkral oh, that's nice! I'll take a look at it soon to try to understand what might be going on

from strawberry-django-plus.

devkral avatar devkral commented on July 18, 2024

fixed (PR merged and tests don't fail anymore).

from strawberry-django-plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.