update graphql tests

This commit is contained in:
Grahame Grieve 2019-06-18 07:30:32 +10:00
parent ecc4f81780
commit a6162ceee0
1 changed files with 41 additions and 14 deletions

View File

@ -1,22 +1,49 @@
{ {
"@type" : "graphql-server-tests", "@type" : "graphql-server-tests",
"tests" : { "instance-tests" : {
"simple" : { "simple" : {
"description" : "Just a simple test of the basic graphQL engine: a simple query on a known patient (example, from the spec)", "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" : { "output" : {
"data" : { "data" : {
"name":[{ "identifier":[{
"given":["Peter","James"], "system":"urn:oid:1.2.36.146.595.217.0.1",
"family":"Chalmers" "value":"12345"
},{ }],
"given":["Jim"] "active":true,
},{ "name":[{
"given":["Peter","James"], "given":["Peter","James"],
"family":"Windsor" "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"
}]
}}
} }
} }
} }