Skip to content

Commit 1345f30

Browse files
committed
resolved review comments
1 parent 5509985 commit 1345f30

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

value/useOfJSON/api.graphql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
type Query {
55
# To sum a and b using the @value directive within src in jsonata,
66
sum(a: Int!, b: Int!): Int! @value(script: {src: "a+b", language: JSONATA})
7-
# To convert a string to lowercase format, use @value in jsonata
8-
lower(value: String): String
9-
@value(script: {src: "$lowercase(value)", language: JSONATA})
10-
# To convert a string to uppercase format, use @value in jsonata
11-
upper(value: String): String
12-
@value(script: {src: "$uppercase(value)", language: JSONATA})
137

148
# To concatenate strings using @value in jsonata
159
concat(a: String, b: String): String

value/useOfJSON/tests/Test.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,10 @@ const {
88

99
describe(testDescription, function () {
1010
const tests = [
11-
{ label: "return sum of two input using @value with JSONATA",
11+
{ label: "return sum of two input using @value with script-json",
1212
query: '{sum(a: 10, b: 10)}',
1313
expected: {sum: 20},
1414
},
15-
{ label: "convert lower string",
16-
query: '{lower(value: "mIAmI")}',
17-
expected: {lower: 'miami'},
18-
},
19-
{ label: "convert upper string",
20-
query: '{upper(value: "mIaMi")}',
21-
expected: {upper: 'MIAMI'},
22-
},
2315
{ label: "concat string",
2416
query: '{concat(a: "Steve",b:"Jobs" )}',
2517
expected: {concat: 'Steve-Jobs'},

0 commit comments

Comments
 (0)