fix resolveReferences()
add safe JSON.stringify() substitute
Merge pull request #159 from codemix/fix-resolve-references

Fix resolve references
fix for empty results from query
Merge pull request #160 from garrett-gottlieb/patch-1

fix for empty results from query