From a6162ceee0171f96e9ce4d6ca65d9ba5049784b0 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Tue, 18 Jun 2019 07:30:32 +1000 Subject: [PATCH] update graphql tests --- .../main/resources/graphql/server-tests.json | 55 ++++++++++++++----- 1 file changed, 41 insertions(+), 14 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 4130e0ee6..c6fbdd927 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 @@ -1,22 +1,49 @@ { "@type" : "graphql-server-tests", - "tests" : { + "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" : { - "name":[{ - "given":["Peter","James"], - "family":"Chalmers" - },{ - "given":["Jim"] - },{ - "given":["Peter","James"], - "family":"Windsor" - }] - } - } + "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" + }] + }} + } + }, + "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}}}", + "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" + }] + }} } } } \ No newline at end of file