@@ -101,7 +101,7 @@ export type ExecutionContext = {
101101 * - `data` is the result of a successful execution of the query.
102102 */
103103export type ExecutionResult = {
104- errors ?: Array < GraphQLError > ,
104+ errors ?: $ReadOnlyArray < GraphQLError > ,
105105 data ?: ObjMap < mixed > ,
106106} ;
107107
@@ -235,7 +235,7 @@ function buildResponse(
235235 */
236236export function responsePathAsArray (
237237 path : ResponsePath ,
238- ) : Array < string | number > {
238+ ) : $ReadOnlyArray < string | number > {
239239 const flattened = [ ] ;
240240 let curr = path ;
241241 while ( curr ) {
@@ -663,7 +663,7 @@ function resolveField(
663663 exeContext: ExecutionContext,
664664 parentType: GraphQLObjectType,
665665 source: mixed,
666- fieldNodes: Array < FieldNode > ,
666+ fieldNodes: $ReadOnlyArray < FieldNode > ,
667667 path: ResponsePath,
668668): mixed {
669669 const fieldNode = fieldNodes [ 0 ] ;
@@ -708,7 +708,7 @@ function resolveField(
708708export function buildResolveInfo(
709709 exeContext: ExecutionContext,
710710 fieldDef: GraphQLField< * , * > ,
711- fieldNodes: Array < FieldNode > ,
711+ fieldNodes: $ReadOnlyArray < FieldNode > ,
712712 parentType: GraphQLObjectType,
713713 path: ResponsePath,
714714): GraphQLResolveInfo {
@@ -733,7 +733,7 @@ export function buildResolveInfo(
733733export function resolveFieldValueOrError< TSource > (
734734 exeContext: ExecutionContext,
735735 fieldDef: GraphQLField< TSource , * > ,
736- fieldNodes: Array < FieldNode > ,
736+ fieldNodes: $ReadOnlyArray < FieldNode > ,
737737 resolveFn: GraphQLFieldResolver< TSource , * > ,
738738 source: TSource,
739739 info: GraphQLResolveInfo,
@@ -766,7 +766,7 @@ export function resolveFieldValueOrError<TSource>(
766766function completeValueCatchingError (
767767 exeContext : ExecutionContext ,
768768 returnType : GraphQLType ,
769- fieldNodes : Array < FieldNode > ,
769+ fieldNodes : $ReadOnlyArray < FieldNode > ,
770770 info: GraphQLResolveInfo,
771771 path: ResponsePath,
772772 result: mixed,
@@ -820,7 +820,7 @@ function completeValueCatchingError(
820820function completeValueWithLocatedError(
821821 exeContext: ExecutionContext,
822822 returnType: GraphQLType,
823- fieldNodes: Array < FieldNode > ,
823+ fieldNodes: $ReadOnlyArray < FieldNode > ,
824824 info: GraphQLResolveInfo,
825825 path: ResponsePath,
826826 result: mixed,
@@ -872,7 +872,7 @@ function completeValueWithLocatedError(
872872function completeValue (
873873 exeContext : ExecutionContext ,
874874 returnType : GraphQLType ,
875- fieldNodes : Array < FieldNode > ,
875+ fieldNodes : $ReadOnlyArray < FieldNode > ,
876876 info: GraphQLResolveInfo,
877877 path: ResponsePath,
878878 result: mixed,
@@ -972,7 +972,7 @@ function completeValue(
972972function completeListValue (
973973 exeContext : ExecutionContext ,
974974 returnType : GraphQLList < * > ,
975- fieldNodes : Array < FieldNode > ,
975+ fieldNodes : $ReadOnlyArray < FieldNode > ,
976976 info : GraphQLResolveInfo ,
977977 path : ResponsePath ,
978978 result : mixed ,
@@ -1034,7 +1034,7 @@ function completeLeafValue(returnType: GraphQLLeafType, result: mixed): mixed {
10341034function completeAbstractValue (
10351035 exeContext : ExecutionContext ,
10361036 returnType : GraphQLAbstractType ,
1037- fieldNodes : Array < FieldNode > ,
1037+ fieldNodes : $ReadOnlyArray < FieldNode > ,
10381038 info : GraphQLResolveInfo ,
10391039 path : ResponsePath ,
10401040 result : mixed ,
@@ -1085,7 +1085,7 @@ function ensureValidRuntimeType(
10851085 runtimeTypeOrName : ?GraphQLObjectType | string ,
10861086 exeContext : ExecutionContext ,
10871087 returnType : GraphQLAbstractType ,
1088- fieldNodes : Array < FieldNode > ,
1088+ fieldNodes : $ReadOnlyArray < FieldNode > ,
10891089 info : GraphQLResolveInfo ,
10901090 result : mixed ,
10911091) : GraphQLObjectType {
@@ -1123,7 +1123,7 @@ function ensureValidRuntimeType(
11231123function completeObjectValue (
11241124 exeContext : ExecutionContext ,
11251125 returnType : GraphQLObjectType ,
1126- fieldNodes : Array < FieldNode > ,
1126+ fieldNodes : $ReadOnlyArray < FieldNode > ,
11271127 info : GraphQLResolveInfo ,
11281128 path : ResponsePath ,
11291129 result : mixed ,
@@ -1169,7 +1169,7 @@ function completeObjectValue(
11691169function invalidReturnTypeError (
11701170 returnType : GraphQLObjectType ,
11711171 result : mixed ,
1172- fieldNodes : Array < FieldNode > ,
1172+ fieldNodes : $ReadOnlyArray < FieldNode > ,
11731173) : GraphQLError {
11741174 return new GraphQLError (
11751175 `Expected value of type "${ returnType . name } " but got: ${ String ( result ) } .` ,
@@ -1180,7 +1180,7 @@ function invalidReturnTypeError(
11801180function collectAndExecuteSubfields (
11811181 exeContext : ExecutionContext ,
11821182 returnType : GraphQLObjectType ,
1183- fieldNodes : Array < FieldNode > ,
1183+ fieldNodes : $ReadOnlyArray < FieldNode > ,
11841184 info : GraphQLResolveInfo ,
11851185 path : ResponsePath ,
11861186 result : mixed ,
0 commit comments