Skip to content

Commit 55ab7f9

Browse files
authored
feat: allow symbols as GraphQLSchema extension fields
1 parent da57238 commit 55ab7f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/type/schema.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ export function assertSchema(schema: unknown): GraphQLSchema {
5454
* your library or project. Do not use a shortened identifier as this increases
5555
* the risk of conflicts. We recommend you add at most one extension field,
5656
* an object which can contain all the values you need.
57+
* Conflicts can be avoided by using a symbol instead of a string key.
5758
*/
5859
export interface GraphQLSchemaExtensions {
59-
[attributeName: string]: unknown;
60+
[attributeName: string | symbol]: unknown;
6061
}
6162

6263
/**

0 commit comments

Comments
 (0)