Zendro-dev / graphql-server

Skeleton NodeJS project for a graphQL server.
GNU General Public License v3.0
0 stars 1 forks source link

Make helper that check for record existence throw informative errors #30

Open asishallab opened 4 years ago

asishallab commented 4 years ago

Currently the helper functions

Change that. The above functions should stop execution immediately if they find an ID in the argument Array that refers to a non existing record. An informative Error should be thrown in this case: ID ${currId} has no existing record in data model ${model.definition.model}

Change names of the helper functions so they remain informative:

asishallab commented 4 years ago

Track name change also in our spec.

tmvoe commented 4 years ago

As discussed, checkExistence was renamed as filterOutIdsNotInUse to better match the implementation.