One dumb way would be to actually parse my `types....
# prisma-whats-new
r
One dumb way would be to actually parse my
types.graphql
file and pick the types as strings and then construct the delete queries
a
That's not that dumb actually. You can use
parse
from
graphql-js
for that, which will give you a nice typemap
r
Oh okay ! I ll check the parse function. I thought it to be dumb since i would have to write the parsing logic myself which may not remain maintainable
a
That's why using the standard graphql library works better 🙂
r
@agartha thanks ! i can seem to get it working. But an interesting question : Do you know how graph.cool is pluralising types ? For example, User becomes allUsers. Mutex becomes allMutexes. Any way to get that mapping in my JS code ?