Skip to content

Should we remove isFallible from reader ast? #949

@PatrykWalach

Description

@PatrykWalach

Just an idea, I don't know if it's any better - reading might be slower, but the artifacts should be smaller.

isFallible was added in normalization ast and reader ast #945 it only indicates how the value is stored.

Instead of generating fields on normalization ast nodes we could generate a map at the root of the ast

const normalizationAst: NormalizationAst = {
  kind: "NormalizationAst",
  fallibleFields: {
    Pet: ["name"],
  },
  selections: /* ... */
}

Then at normalization time we merge this into the same kind of map attached to the store and during reading we can lookup the map. We probably have to serialize this map during ssr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions