forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[graphql/rpc] enforce ban on directives (MystenLabs#15124)
- Loading branch information
Showing
3 changed files
with
103 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
processed 3 tasks | ||
|
||
init: | ||
A: object(0,0) | ||
|
||
task 1 'run-graphql'. lines 6-10: | ||
Response: { | ||
"data": null, | ||
"errors": [ | ||
{ | ||
"message": "Fields with directives are not supported", | ||
"locations": [ | ||
{ | ||
"line": 2, | ||
"column": 3 | ||
} | ||
], | ||
"extensions": { | ||
"code": "INTERNAL_SERVER_ERROR" | ||
} | ||
} | ||
] | ||
} | ||
|
||
task 2 'run-graphql'. lines 12-40: | ||
Response: { | ||
"data": null, | ||
"errors": [ | ||
{ | ||
"message": "Fragments with directives are not supported", | ||
"locations": [ | ||
{ | ||
"line": 1, | ||
"column": 1 | ||
} | ||
], | ||
"extensions": { | ||
"code": "INTERNAL_SERVER_ERROR" | ||
} | ||
} | ||
] | ||
} |
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,40 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
//# init --addresses Test=0x0 --accounts A --simulator | ||
|
||
//# run-graphql | ||
|
||
{ | ||
chainIdentifier @deprecated | ||
} | ||
|
||
//# run-graphql | ||
|
||
fragment Modules on Object @deprecated { | ||
location | ||
asMovePackage { | ||
module(name: "m") { | ||
name | ||
package { asObject { location } } | ||
|
||
fileFormatVersion | ||
bytes | ||
disassembly | ||
} | ||
} | ||
} | ||
|
||
{ | ||
transactionBlockConnection(last: 1) { | ||
nodes { | ||
effects { | ||
objectChanges { | ||
outputState { | ||
...Modules | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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