-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1761 from DimuthuMadushan/cache-update
Fix Invalid Cache Key Generation in Server Side Caching
- Loading branch information
Showing
16 changed files
with
242 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
ballerina-tests/tests/resources/documents/server_cache_with_list_input.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
query A { | ||
users1(ids: [1]) { | ||
id | ||
name | ||
age | ||
} | ||
} | ||
|
||
query B { | ||
users1(ids: [2]) { | ||
id | ||
name | ||
age | ||
} | ||
} | ||
|
||
query C { | ||
users1(ids: [3]) { | ||
id | ||
name | ||
age | ||
} | ||
} | ||
|
||
query D { | ||
users2(ids: [[1], [3], [2]]) { | ||
id | ||
name | ||
age | ||
} | ||
} | ||
|
||
query E { | ||
users2(ids: [[1], [2], [3]]) { | ||
id | ||
name | ||
age | ||
} | ||
} | ||
|
||
query F { | ||
cities(addresses: [{number: "1", street: "Main St", city: "London"}]) | ||
} | ||
|
||
mutation G { | ||
updateUser(id: 1, name: "Shane", age: 30) { | ||
id | ||
name | ||
age | ||
} | ||
} | ||
|
||
mutation H { | ||
updateUser(id: 1, name: "Rock", age: 22) { | ||
id | ||
name | ||
age | ||
} | ||
} | ||
|
||
query I { | ||
cities(addresses: [{number: "2", street: "Main St", city: "london"}]) | ||
} |
11 changes: 11 additions & 0 deletions
11
ballerina-tests/tests/resources/expected_results/server_cache_with_list_input_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"data": { | ||
"users1": [ | ||
{ | ||
"id": 1, | ||
"name": "John", | ||
"age": 25 | ||
} | ||
] | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
ballerina-tests/tests/resources/expected_results/server_cache_with_list_input_2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"data": { | ||
"users1": [ | ||
{ | ||
"id": 2, | ||
"name": "Jessie", | ||
"age": 17 | ||
} | ||
] | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
ballerina-tests/tests/resources/expected_results/server_cache_with_list_input_3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"data": { | ||
"updateUser": { | ||
"id": 1, | ||
"name": "Shane", | ||
"age": 30 | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
ballerina-tests/tests/resources/expected_results/server_cache_with_list_input_4.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"data": { | ||
"users2": [ | ||
{ | ||
"id": 1, | ||
"name": "Shane", | ||
"age": 30 | ||
} | ||
] | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
ballerina-tests/tests/resources/expected_results/server_cache_with_list_input_5.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"data": { | ||
"updateUser": { | ||
"id": 1, | ||
"name": "Rock", | ||
"age": 22 | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
ballerina-tests/tests/resources/expected_results/server_cache_with_list_input_6.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"data": { | ||
"users2": [ | ||
{ | ||
"id": 1, | ||
"name": "Rock", | ||
"age": 22 | ||
} | ||
] | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
ballerina-tests/tests/resources/expected_results/server_cache_with_list_input_7.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"data": { | ||
"cities": ["London"] | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
ballerina-tests/tests/resources/expected_results/server_cache_with_list_input_8.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"data": { | ||
"cities": ["London", "london"] | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
ballerina-tests/tests/resources/expected_results/server_cache_with_nullable_inputs_7.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"data": { | ||
"data": { | ||
"status": ["dead", "alive"] | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
ballerina-tests/tests/resources/expected_results/server_cache_with_nullable_inputs_8.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"data": { | ||
"status": ["alive", "alive"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters