gajus / gajus/graphql-deduplicator

Custom keyfields like Apollo InMemoryCache

Open
#29 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
279
Forks
17
PR merge metrics
No merged PRs in 30d

Description

I have some objects which don't use `id` as the key but some other fields and some objects where the id is not unique so I would like to disable de-duplication for them.

Is there a way to support a similar config as InMemoryCache to disable the de-duplication for them based on __typename?

Also Apollo supports both `id` and `_id` by default, can this module match the behaviour or atleast provide an option for default key name?

Contributor guide

No contributing guide indexed for this repository

Research direction

Use Apollo InMemoryCache as the reference behavior described in the issue. Define how configuration keyed by __typename should select custom key fields or disable de-duplication, and whether id and _id should be supported by default or through an option. Done means these cases are specified and covered by the project's relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, javascript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.