Skip to content

Add some shorthands for special keyFields overridesΒ #469

@epmatsw

Description

@epmatsw

Per the docs right now:

    AllProducts: {
      // Singleton types that have no identifying field can use an empty
      // array for their keyFields.
      keyFields: [],
    },
    Store: {
      // If you need to disable normalization, set the keyFields to false
      // and the object will be embedded in the parent
      keyFields: false,
    },

these two cases make sense mechanically, but they're kind of hard to remember. I end up looking at that page somewhat frequently just to make sure I'm picking the right behavior.

I think it'd be nice if these two cases could be something like keyFields: "singleton" and keyFields: "no-normalize" or something like that so that it's easier to remember what they're doing.

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