graphql-python / graphql-python/graphql-core-legacy

Violation of Liskov Substitution Principle

Offen
#247 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
372
Forks
175
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

https://github.com/graphql-python/graphql-core/blob/3ba7f9218bca7a039b109b103cf57b1511d970c7/graphql/execution/executor.py#L704

Above referenced line violates Liskov Substitution Principle when used with at least Graphene-Django and the underlying model is itself a subclass of aDjangoObjectType.Meta.model class.

A popular variant of this violation is use of django-polymorphic, which is quite prevalent. However, we're talking basic Python here.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start at graphql/execution/executor.py#L704 and read the surrounding execution logic to understand how subclassed Django models are handled. Reproduce the reported behavior with Graphene-Django and, if available, django-polymorphic, then identify the expected substitution behavior and add regression coverage. Done means the reported subclass scenario works without breaking existing execution behavior.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
api, backend
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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