Skip to content

Commit

Permalink
fix: Fix issue with ResourceList resolver (#20)
Browse files Browse the repository at this point in the history
fixes issue #19
  • Loading branch information
Robert-W committed Jan 23, 2019
1 parent 74986a8 commit 6826b37
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@
contains graphql which may require you to delete and reinstall node
modules. We have updated several versions so when updating, you should
rerun yarn install and may need to remove node_modules before hand.



14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graphql-fhir",
"version": "1.0.0",
"version": "1.0.1",
"description": "A Javascript based GraphQL FHIR server",
"main": "index.js",
"author": "Robert-W <rwinterbottom@asymmetrik.com>>",
Expand All @@ -12,7 +12,7 @@
"test": "cross-env NODE_ENV=test node src/scripts/test",
"prettier": "prettier \"src/**/*.js\" --write",
"lint": "eslint \"src/**/*.js\"",
"changelog": "conventional-changelog -p angular -s -r 0 -i CHANGELOG.md"
"changelog": "conventional-changelog -p angular -s -r 0 -i CHANGELOG.md"
},
"prettier": {
"trailingComma": "all",
Expand Down Expand Up @@ -55,15 +55,15 @@
"lcov",
"json"
],
"setupFiles": [
"<rootDir>/src/environment.js"
],
"testEnvironment": "node",
"setupFiles": [
"<rootDir>/src/environment.js"
],
"testEnvironment": "node",
"testPathIgnorePatterns": [
"<rootDir>/src/scripts/"
],
"coveragePathIgnorePatterns": [
"<rootDir>/src/environment.js",
"<rootDir>/src/environment.js",
"<rootDir>/src/resources/"
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/resources/1_0_2/schemas/resourcelist.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ module.exports = new GraphQLUnionType({
require('./testscript.schema.js'),
require('./visionprescription.schema.js'),
],
resolveType(value) {
resolveType(data) {
if (data && data.resourceType === 'ValueSet') {
return require('./valueset.schema.js');
}
Expand Down
2 changes: 1 addition & 1 deletion src/resources/3_0_1/schemas/resourcelist.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ module.exports = new GraphQLUnionType({
require('./valueset.schema.js'),
require('./visionprescription.schema.js'),
],
resolveType(value) {
resolveType(data) {
if (data && data.resourceType === 'Resource') {
return require('./resource.schema.js');
}
Expand Down
2 changes: 1 addition & 1 deletion src/resources/4_0_0/schemas/resourcelist.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ module.exports = new GraphQLUnionType({
require('./verificationresult.schema.js'),
require('./visionprescription.schema.js'),
],
resolveType(value) {
resolveType(data) {
if (data && data.resourceType === 'Resource') {
return require('./resource.schema.js');
}
Expand Down

0 comments on commit 6826b37

Please sign in to comment.