You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/HotChocolate/Core/test/Types.Analyzers.Integration.Tests/__snapshots__/InterfaceTests.Schema_Snapshot.snap
+58Lines changed: 58 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,64 @@ type Book implements Product {
13
13
kind:String!
14
14
}
15
15
16
+
"Information about pagination in a connection."
17
+
typePageInfo {
18
+
"Indicates whether more edges exist following the set defined by the clients arguments."
19
+
hasNextPage:Boolean!
20
+
"Indicates whether more edges exist prior the set defined by the clients arguments."
21
+
hasPreviousPage:Boolean!
22
+
"When paginating backwards, the cursor to continue."
23
+
startCursor:String
24
+
"When paginating forwards, the cursor to continue."
25
+
endCursor:String
26
+
}
27
+
28
+
"A connection to a list of items."
29
+
typeProductsConnection {
30
+
"Information to aid in pagination."
31
+
pageInfo:PageInfo!
32
+
"A list of edges."
33
+
edges: [ProductsEdge!]
34
+
"A flattened list of the nodes."
35
+
nodes: [Product!]
36
+
}
37
+
38
+
"An edge in a connection."
39
+
typeProductsEdge {
40
+
"A cursor for use in pagination."
41
+
cursor:String!
42
+
"The item at the end of the edge."
43
+
node:Product!
44
+
}
45
+
16
46
typeQuery {
17
47
product:Product!
48
+
products("Returnstheelementsinthelistthatcomeafterthespecifiedcursor." after:Version2"Returns the first _n_ elements from the list."first: Int"Returns the last _n_ elements from the list."last: Int"Returns the elements in the list that come before the specified cursor."before: String):ProductsConnection @listSize(assumedSize:50, slicingArguments: [ "first", "last" ], slicingArgumentDefaultValue:10, sizedFields: [ "edges", "nodes" ], requireOneSlicingArgument:false) @cost(weight:"10")
"The purpose of the `cost` directive is to define a `weight` for GraphQL types, fields, and arguments. Static analysis can use these weights when calculating the overall cost of a query or response."
69
+
directive @cost("The `weight` argument defines what value to add to the overall cost for every appearance, or possible appearance, of a type, field, argument, etc."weight: String!) onSCALAR|OBJECT|FIELD_DEFINITION|ARGUMENT_DEFINITION|ENUM|INPUT_FIELD_DEFINITION
70
+
71
+
"The purpose of the `@listSize` directive is to either inform the static analysis about the size of returned lists (if that information is statically available), or to point the analysis to where to find that information."
72
+
directive @listSize("The `assumedSize` argument can be used to statically define the maximum length of a list returned by a field." assumedSize: Int "The `slicingArguments` argument can be used to define which of the field's arguments with numeric type are slicing arguments, so that their value determines the size of the list returned by that field. It may specify a list of multiple slicing arguments." slicingArguments: [String!] "The `slicingArgumentDefaultValue` argument can be used to define a default value for a slicing argument, which is used if the argument is not present in a query." slicingArgumentDefaultValue: Int "The `sizedFields` argument can be used to define that the value of the `assumedSize` argument or of a slicing argument does not affect the size of a list returned by a field itself, but that of a list returned by one of its sub-fields." sizedFields: [String!] "The `requireOneSlicingArgument` argument can be used to inform the static analysis that it should expect that exactly one of the defined slicing arguments is present in a query. If that is not the case (i.e., if none or multiple slicing arguments are present), the static analysis may throw an error." requireOneSlicingArgument: Boolean = true) on FIELD_DEFINITION
0 commit comments