graphql-python / graphql-python/graphene

call super() from resolve_<field_name> to get default resolver

Offen
#1,283 1 Kommentar 10 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
✨ enhancement
Vorherrschende Sprache
Python
Sterne
8.2k
Forks
818
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Here is the problem, I need to create a custom resolve method but the path
for the logic to might not always require the logic added in the custom resolve method thus
I would like to use the default resolver for the field.

But I am frustrated, in the MRO hierarchy there would be no class with that exact resolve name
because the resolve method is created computationally with a call to type() in some Meta or _meta* method
like it is done in https://github.com/graphql-python/graphene-django/

Ideally I could call super().resolve(info, **args) and graphene would know how to resolve the function call

I have no idea how else to call the auto generated resolver in graphene_django, unless it would be the same name as the resolver function from which im calling super which I guess makes sense, but I believe this to be
a graphene error because the ModelObjectType inherits from ObjectType.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.