0xPlaygrounds / 0xPlaygrounds/subgrounds

Effectively deep-freeze Query objects

Offen
#38 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement internal
Vorherrschende Sprache
Python
Sterne
73
Forks
12
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Is your feature request related to a problem? Please describe.**
`subgrounds/query.py` has all objects related to the AST of GraphQL. Currently, every object is frozen, but nested fields of said objects are not (such as nested `list`s and `dict`s). This means the greater objects of `Document`, etc are **not** hashable.

**Describe the solution you'd like**
Ensure all query objects are hashable by using immutable data structures.

**Additional context**
Likely should be considered with a general refactor / subpackage breakdown of `subgrounds/query.py`).

**Implementation checklist**
- [ ] Task 1

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

The issue is about making query objects in subgrounds/query.py hashable by ensuring nested structures are immutable. Start by examining the AST classes in that file, focusing on how lists and dicts are currently stored. Look into using tuple and types.MappingProxyType or implementing __hash__ methods. Check if there are existing tests for hashing or freezing behavior to understand the expected outcome.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
graphql, python
Bereich
api, backend
Issue-Typ
Refactoring
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

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