Skip to content

Instantly share code, notes, and snippets.

@philsch
Created June 7, 2019 07:43
Show Gist options
  • Save philsch/0d35144d0ce2db7c46791d9804edd3d6 to your computer and use it in GitHub Desktop.
Save philsch/0d35144d0ce2db7c46791d9804edd3d6 to your computer and use it in GitHub Desktop.
Blogpost: Easy integration testing of GraphQL with Jest
#!/usr/bin/env bash
# Truncate data in ShopItems collection
mongo shop --host localhost:27017 --username xxx --password xxx --authenticationDatabase admin \
--eval 'db.getCollection("ShopItems").remove({})'
# Import seed data into ShopItems collection
mongoimport --host localhost:27017 --username xxx --password xxx --authenticationDatabase admin \
--db shop --collection ShopItems --type JSON --file ShopItems.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment