nerdsupremacist / Graphaello

A Tool for Writing Declarative, Type-Safe and Data-Driven Applications in SwiftUI using GraphQL

Home Page:https://graphaello.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mutations are not properly propagated to parents

nerdsupremacist opened this issue · comments

Currently you can change values of the GraphQL property wrapper after a mutation.

However, when the mutated value is in a Fragment, the change isn't propagated to the original dictionary from where the query originated from.

This is an issue in the following scenarios:

  • The Fragment is actually in a List and the view gets recycled: then it will change back to the original value at some point.
  • The Fragment and the Parent both use the same variables. Then they run out of sync with each other

This will most likely require a rewrite of a lot of the GraphQL Property Wrapper and the generated initializer code