From c002d5b5d15df31f175617fbb6658623666a989e Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Wed, 19 Jun 2019 04:55:21 +1000 Subject: [PATCH] fix graph-ql tests --- .../main/resources/graphql/server-tests.json | 98 ++++++++++++------- 1 file changed, 65 insertions(+), 33 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/resources/graphql/server-tests.json b/org.hl7.fhir.r5/src/main/resources/graphql/server-tests.json index c6fbdd927..aff6d3b5d 100644 --- a/org.hl7.fhir.r5/src/main/resources/graphql/server-tests.json +++ b/org.hl7.fhir.r5/src/main/resources/graphql/server-tests.json @@ -3,47 +3,79 @@ "instance-tests" : { "simple" : { "description" : "Just a simple test of the basic graphQL engine: a simple query on a known patient (example, from the spec)", - "url" : "/Patient/example/$graphql?query={identifier{system,value}active,name{text,given,family}}", + "url" : "/Patient/example/$graphql?query={identifier{system,value}active,name{text,given,family}}" "output" : { "data" : { - "identifier":[{ - "system":"urn:oid:1.2.36.146.595.217.0.1", - "value":"12345" - }], - "active":true, - "name":[{ - "given":["Peter","James"], - "family":"Chalmers" - },{ - "given":["Jim"] - },{ - "given":["Peter","James"], - "family":"Windsor" - }] - }} + "active" : true, + "identifier" : [ + { + "system" : "urn:oid:1.2.36.146.595.217.0.1", + "value" : "12345" + } + ], + "name" : [ + { + "family" : "Chalmers", + "given" : [ + "Peter", + "James" + ] + }, + { + "given" : [ + "Jim" + ] + }, + { + "family" : "Windsor", + "given" : [ + "Peter", + "James" + ] + } + ] + } + }, } }, "root-tests" : { "simple" : { "description" : "Just a simple test of the basic graphQL engine: a simple query on a known patient (example, from the spec)", - "url" : "/$graphql?query={Patient(id:example){identifier{system,value}active,name{text,given,family}}}", + "url" : "/$graphql?query={Patient(_id:example){identifier{system,value}active,name{text,given,family}}}" "output" : { "data" : { - "identifier":[{ - "system":"urn:oid:1.2.36.146.595.217.0.1", - "value":"12345" - }], - "active":true, - "name":[{ - "given":["Peter","James"], - "family":"Chalmers" - },{ - "given":["Jim"] - },{ - "given":["Peter","James"], - "family":"Windsor" - }] - }} + "Patient" : { + "active" : true, + "identifier" : [ + { + "system" : "urn:oid:1.2.36.146.595.217.0.1", + "value" : "12345" + } + ], + "name" : [ + { + "family" : "Chalmers", + "given" : [ + "Peter", + "James" + ] + }, + { + "given" : [ + "Jim" + ] + }, + { + "family" : "Windsor", + "given" : [ + "Peter", + "James" + ] + } + ] + } + } + }, } } -} \ No newline at end of file +}