kukeiko / entity-space

MIT License
5 stars 1 forks source link

subtractQueries() can return queries with widened criteria #198

Closed kukeiko closed 1 year ago

kukeiko commented 1 year ago

query A:

song({ artistId: {4, 1}, locations: any })/{ id, name, duration, artistId, locations: { songLocationType } }

queries B:

[
  song(({ id: {20, 19, 18, 17, 16, 15, 14, 13, 21} } | { artistId: {4}, locations: any })),
  song({ artistId: {4}, locations: any })/{ id, name, duration, artistId, locations: { songLocationType } }
]

results in queries:

[
  song({ artistId: {1}, locations: any })/{ id, name, duration, artistId, locations: { songLocationType } }, // OK
  song({ id: {20, 19, 18, 17, 16, 15, 14, 13, 21} })/{ locations: { songLocationType } } // BAD
]