-
Hello all, first of all: ariadne saved my live! While the graphene (and especially the graphene-sqlalchemy) is only half-baken and seems to be created mainly for Django-users, ariadne provides you the flexibility, robustness and easyness, regardless of the framework you use. A big "THANK YOU!" for the framework and maintaining it! The reason for this post: I hit an issue which I personally think is a bug, but would need confirmation on if this is intended or not. If you have an input variables for mutations of type Workarounds I found:
IMHO this is a bug, as the framework can (it has the schema at its hand) distinguish between input variables and the actual input. How do you solve such cases? If this is a bug, I would file a bug. I just wanted to confirm that it's not just me, as I'm relatively fresh into the topic. Thank you in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I'll say its a limitation and design decision. Decorator was designed to be simple, fast, and work in most of cases. Ofc we could roll in something super complex that introspects the schema, but that would grow up the complexity by a great deal, and I don't see much value when I compare gains to new maintenance burden. IMHO you are missing alternative no. 4: roll in your own @convert_kwargs_to_snake_case(exclude=["input.raw_data"])
def resolve_smthing(*_, id, input):
... |
Beta Was this translation helpful? Give feedback.
I'll say its a limitation and design decision. Decorator was designed to be simple, fast, and work in most of cases.
Ofc we could roll in something super complex that introspects the schema, but that would grow up the complexity by a great deal, and I don't see much value when I compare gains to new maintenance burden.
IMHO you are missing alternative no. 4: roll in your own
convert_kwargs_to_snake_case
fork that takes extra argument (exclude=
) that lets you explicitly disable given variables, eg: