diff --git a/src/error/GraphQLError.ts b/src/error/GraphQLError.ts index 2bb3ccb7cd..53efd1d326 100644 --- a/src/error/GraphQLError.ts +++ b/src/error/GraphQLError.ts @@ -44,7 +44,7 @@ export function isGraphQLError(error: unknown): error is GraphQLError { * GraphQL document and/or execution result that correspond to the Error. */ export class GraphQLError extends Error { - [isGraphQLErrorSymbol]: true = true; + readonly [isGraphQLErrorSymbol]: true = true; /** * An array of `{ line, column }` locations within the source GraphQL document * which correspond to this error. diff --git a/src/language/source.ts b/src/language/source.ts index 8f6fed590a..1284da249e 100644 --- a/src/language/source.ts +++ b/src/language/source.ts @@ -15,7 +15,7 @@ const isSourceSymbol = Symbol.for('Source'); * The `line` and `column` properties in `locationOffset` are 1-indexed. */ export class Source { - [isSourceSymbol]: true = true; + readonly [isSourceSymbol]: true = true; body: string; name: string; locationOffset: Location; diff --git a/src/type/directives.ts b/src/type/directives.ts index 440cc432d3..7f1c09a987 100644 --- a/src/type/directives.ts +++ b/src/type/directives.ts @@ -57,7 +57,7 @@ const isGraphQLDirectiveSymbol = Symbol.for('GraphQLDirective'); * behavior. Type system creators will usually not create these directly. */ export class GraphQLDirective { - [isGraphQLDirectiveSymbol]: true = true; + readonly [isGraphQLDirectiveSymbol]: true = true; name: string; description: Maybe; locations: ReadonlyArray; diff --git a/src/type/schema.ts b/src/type/schema.ts index 61b11a9fbd..ddd81d3b5d 100644 --- a/src/type/schema.ts +++ b/src/type/schema.ts @@ -136,11 +136,12 @@ const isSchemaSymbol = Symbol.for('GraphQLSchema'); * ``` */ export class GraphQLSchema { + readonly [isSchemaSymbol]: true = true; + description: Maybe; extensions: Readonly; astNode: Maybe; extensionASTNodes: ReadonlyArray; - [isSchemaSymbol]: true = true; // Used as a cache for validateSchema(). __validationErrors: Maybe>;